Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/ChartMode.java Thu Aug 16 16:27:53 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/ChartMode.java Thu Aug 16 16:28:03 2018 +0200 @@ -11,49 +11,42 @@ import java.util.List; import org.dive4elements.river.client.client.ui.CollectionView; +import org.dive4elements.river.client.client.ui.NoopThemeRecordHandler; import org.dive4elements.river.client.client.ui.OutputTab; import org.dive4elements.river.client.client.ui.chart.ChartOutputTab; import org.dive4elements.river.client.client.ui.chart.NaviChartOutputTab; - /** * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> */ public class ChartMode extends DefaultOutputMode { + private static final long serialVersionUID = 1L; + public ChartMode() { } - - public ChartMode(String name, String desc, String mimeType) { - super(name, desc, mimeType); - } - + public ChartMode(final String name, final String descrition, final String mimeType, final List<Facet> facets, final String type) { + super(name, descrition, mimeType, facets); - public ChartMode( - String name, - String descrition, - String mimeType, - List<Facet> facets, - String type) - { - super(name, descrition, mimeType, facets); this.type = type; } - /** Create output tab. Some outs feel better inside a specialized one. */ @Override - public OutputTab createOutputTab(String t, Collection c, CollectionView p) { - if (this.getName().equals("fix_wq_curve") || - this.getName().equals("extreme_wq_curve") || - this.getName().equals("fix_deltawt_curve") || - this.getName().equals("fix_derivate_curve") || - this.getName().equals("fix_vollmer_wq_curve") || - this.getName().equals("sinfo_floodduration_curve")){ + public OutputTab createOutputTab(final String t, final Collection c, final CollectionView p) { + final String modeName = this.getName(); + + if (modeName.equals("fix_wq_curve") || // + modeName.equals("extreme_wq_curve") || // + modeName.equals("fix_deltawt_curve") || // + modeName.equals("fix_derivate_curve") || // + modeName.equals("fix_vollmer_wq_curve") || // + modeName.equals("sinfo_floodduration_curve")) { + return new NaviChartOutputTab(t, c, this, p); } - return new ChartOutputTab(t, c, this, p); + + return new ChartOutputTab(t, c, this, p, new NoopThemeRecordHandler()); } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : +} \ No newline at end of file