Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java @ 911:4668357b255e
#259 Refresh charts after loading new Themes / Artifacts from Datacage.
flys-client/trunk@2768 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 15 Sep 2011 17:01:12 +0000 |
parents | 6b047887855b |
children | 66192d170c79 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java Thu Sep 15 16:27:07 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java Thu Sep 15 17:01:12 2011 +0000 @@ -29,6 +29,8 @@ import de.intevation.flys.client.client.event.PanEvent; import de.intevation.flys.client.client.event.PanHandler; import de.intevation.flys.client.client.event.RedrawRequestHandler; +import de.intevation.flys.client.client.event.RedrawRequestEvent; +import de.intevation.flys.client.client.event.RedrawRequestEvent.Type; import de.intevation.flys.client.client.event.ZoomEvent; import de.intevation.flys.client.client.event.ZoomHandler; import de.intevation.flys.client.client.services.ChartInfoService; @@ -68,6 +70,8 @@ /** The collection view.*/ protected CollectionView view; + protected ChartThemePanel ctp; + /** The canvas that wraps the chart toolbar. */ protected Canvas tbarPanel; @@ -129,7 +133,6 @@ // Output "cross_section" needs slightly modified ThemePanel // (with action buttons). - ChartThemePanel ctp = null; if (mode.getName().equals("cross_section")) { ctp = new CrossSectionChartThemePanel(collection, mode); } @@ -168,8 +171,15 @@ } - public void onRedrawRequest() { - resetRanges(); + public void onRedrawRequest(RedrawRequestEvent event) { + if (event.getType() == Type.RESET) { + resetRanges(); + } + else { + ctp.updateCollection(); + updateChartPanel(); + updateChartInfo(); + } }