# HG changeset patch # User Ingo Weinzierl # Date 1350987863 -7200 # Node ID b7535b66490ee90863f146d174eb2bc6c0a76ced # Parent 6ae99d996f79ec05abe7fcf8c6d4ce6a822c67f1 Show the 'DischargeTablesChart' when choosing the calculation timerange in historical discharge calculation. diff -r 6ae99d996f79 -r b7535b66490e flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java Tue Oct 23 12:01:19 2012 +0200 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java Tue Oct 23 12:24:23 2012 +0200 @@ -1060,5 +1060,9 @@ String gauge_discharge_curve_at_export(); + String discharge_timeranges(); + + String discharge_chart(); + } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r 6ae99d996f79 -r b7535b66490e flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties --- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties Tue Oct 23 12:01:19 2012 +0200 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties Tue Oct 23 12:24:23 2012 +0200 @@ -551,3 +551,5 @@ gauge_url = https://flys-intern.intevation.de/PegelInfo/ gauge_river_url = https://flys-intern.intevation.de/GewaesserInfo/ gauge_curve_link = Dischargecurve +discharge_timeranges = DC-Timeranges +discharge_chart = DC-Chart \ No newline at end of file diff -r 6ae99d996f79 -r b7535b66490e flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties --- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties Tue Oct 23 12:01:19 2012 +0200 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties Tue Oct 23 12:24:23 2012 +0200 @@ -549,3 +549,5 @@ gauge_url = https://flys-intern.intevation.de/PegelInfo/ gauge_river_url = https://flys-intern.intevation.de/GewaesserInfo/ gauge_curve_link = Abflusskurve +discharge_timeranges = AK-Zeitr\u00e4ume +discharge_chart = AK-Diagramm \ No newline at end of file diff -r 6ae99d996f79 -r b7535b66490e flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties --- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties Tue Oct 23 12:01:19 2012 +0200 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties Tue Oct 23 12:24:23 2012 +0200 @@ -550,3 +550,5 @@ gauge_url = https://flys-intern.intevation.de/PegelInfo/ gauge_river_url = https://flys-intern.intevation.de/GewaesserInfo/ gauge_curve_link = Dischargecurve +discharge_timeranges = DC-Timeranges +discharge_chart = DC-Chart \ No newline at end of file diff -r 6ae99d996f79 -r b7535b66490e flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugeTimeRangePanel.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugeTimeRangePanel.java Tue Oct 23 12:01:19 2012 +0200 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugeTimeRangePanel.java Tue Oct 23 12:24:23 2012 +0200 @@ -18,10 +18,13 @@ import com.smartgwt.client.widgets.grid.events.RecordClickHandler; import com.smartgwt.client.widgets.layout.HLayout; import com.smartgwt.client.widgets.layout.VLayout; +import com.smartgwt.client.widgets.tab.Tab; +import com.smartgwt.client.widgets.tab.TabSet; import de.intevation.flys.client.client.Config; import de.intevation.flys.client.client.FLYSConstants; import de.intevation.flys.client.client.ui.range.DischargeInfoDataSource; +import de.intevation.flys.client.client.widgets.DischargeTablesChart; import de.intevation.flys.client.shared.model.ArtifactDescription; import de.intevation.flys.client.shared.model.Data; import de.intevation.flys.client.shared.model.DataItem; @@ -97,7 +100,7 @@ String url = config.getServerUrl(); yearTable.setDataSource(new DischargeInfoDataSource(url, gauge)); - helperContainer.addMember(yearTable); + helperContainer.addMember(createHelperPanel()); setMaxUpper(data); setMaxLower(data); @@ -106,6 +109,22 @@ } + protected Canvas createHelperPanel() { + TabSet tabs = new TabSet(); + + Tab table = new Tab(MSG.discharge_timeranges()); + Tab chart = new Tab(MSG.discharge_chart()); + + table.setPane(yearTable); + chart.setPane(new DischargeTablesChart(artifact)); + + tabs.addTab(table, 0); + tabs.addTab(chart, 1); + + return tabs; + } + + @Override protected void initDefaults(DataList dataList) { RangeData data = findRangeData(dataList);