Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/shared/model/ChartMode.java @ 9416:05405292a7ca
Navigationtheme panel now shows themes of dWt and WQ charts grayed out, if the current station is outside the valid range of the theme.
author | gernotbelger |
---|---|
date | Thu, 16 Aug 2018 16:28:03 +0200 |
parents | abf14917be32 |
children |
comparison
equal
deleted
inserted
replaced
9415:9744ce3c3853 | 9416:05405292a7ca |
---|---|
9 package org.dive4elements.river.client.shared.model; | 9 package org.dive4elements.river.client.shared.model; |
10 | 10 |
11 import java.util.List; | 11 import java.util.List; |
12 | 12 |
13 import org.dive4elements.river.client.client.ui.CollectionView; | 13 import org.dive4elements.river.client.client.ui.CollectionView; |
14 import org.dive4elements.river.client.client.ui.NoopThemeRecordHandler; | |
14 import org.dive4elements.river.client.client.ui.OutputTab; | 15 import org.dive4elements.river.client.client.ui.OutputTab; |
15 import org.dive4elements.river.client.client.ui.chart.ChartOutputTab; | 16 import org.dive4elements.river.client.client.ui.chart.ChartOutputTab; |
16 import org.dive4elements.river.client.client.ui.chart.NaviChartOutputTab; | 17 import org.dive4elements.river.client.client.ui.chart.NaviChartOutputTab; |
17 | |
18 | 18 |
19 /** | 19 /** |
20 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 20 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
21 */ | 21 */ |
22 public class ChartMode extends DefaultOutputMode { | 22 public class ChartMode extends DefaultOutputMode { |
23 | 23 |
24 private static final long serialVersionUID = 1L; | |
25 | |
24 public ChartMode() { | 26 public ChartMode() { |
25 } | 27 } |
26 | 28 |
29 public ChartMode(final String name, final String descrition, final String mimeType, final List<Facet> facets, final String type) { | |
30 super(name, descrition, mimeType, facets); | |
27 | 31 |
28 public ChartMode(String name, String desc, String mimeType) { | |
29 super(name, desc, mimeType); | |
30 } | |
31 | |
32 | |
33 public ChartMode( | |
34 String name, | |
35 String descrition, | |
36 String mimeType, | |
37 List<Facet> facets, | |
38 String type) | |
39 { | |
40 super(name, descrition, mimeType, facets); | |
41 this.type = type; | 32 this.type = type; |
42 } | 33 } |
43 | 34 |
44 | |
45 /** Create output tab. Some outs feel better inside a specialized one. */ | 35 /** Create output tab. Some outs feel better inside a specialized one. */ |
46 @Override | 36 @Override |
47 public OutputTab createOutputTab(String t, Collection c, CollectionView p) { | 37 public OutputTab createOutputTab(final String t, final Collection c, final CollectionView p) { |
48 if (this.getName().equals("fix_wq_curve") || | 38 final String modeName = this.getName(); |
49 this.getName().equals("extreme_wq_curve") || | 39 |
50 this.getName().equals("fix_deltawt_curve") || | 40 if (modeName.equals("fix_wq_curve") || // |
51 this.getName().equals("fix_derivate_curve") || | 41 modeName.equals("extreme_wq_curve") || // |
52 this.getName().equals("fix_vollmer_wq_curve") || | 42 modeName.equals("fix_deltawt_curve") || // |
53 this.getName().equals("sinfo_floodduration_curve")){ | 43 modeName.equals("fix_derivate_curve") || // |
44 modeName.equals("fix_vollmer_wq_curve") || // | |
45 modeName.equals("sinfo_floodduration_curve")) { | |
46 | |
54 return new NaviChartOutputTab(t, c, this, p); | 47 return new NaviChartOutputTab(t, c, this, p); |
55 } | 48 } |
56 return new ChartOutputTab(t, c, this, p); | 49 |
50 return new ChartOutputTab(t, c, this, p, new NoopThemeRecordHandler()); | |
57 } | 51 } |
58 } | 52 } |
59 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |