comparison 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
comparison
equal deleted inserted replaced
910:7f72239e56c8 911:4668357b255e
27 import de.intevation.flys.client.client.event.OutputParameterChangeEvent; 27 import de.intevation.flys.client.client.event.OutputParameterChangeEvent;
28 import de.intevation.flys.client.client.event.OutputParameterChangeHandler; 28 import de.intevation.flys.client.client.event.OutputParameterChangeHandler;
29 import de.intevation.flys.client.client.event.PanEvent; 29 import de.intevation.flys.client.client.event.PanEvent;
30 import de.intevation.flys.client.client.event.PanHandler; 30 import de.intevation.flys.client.client.event.PanHandler;
31 import de.intevation.flys.client.client.event.RedrawRequestHandler; 31 import de.intevation.flys.client.client.event.RedrawRequestHandler;
32 import de.intevation.flys.client.client.event.RedrawRequestEvent;
33 import de.intevation.flys.client.client.event.RedrawRequestEvent.Type;
32 import de.intevation.flys.client.client.event.ZoomEvent; 34 import de.intevation.flys.client.client.event.ZoomEvent;
33 import de.intevation.flys.client.client.event.ZoomHandler; 35 import de.intevation.flys.client.client.event.ZoomHandler;
34 import de.intevation.flys.client.client.services.ChartInfoService; 36 import de.intevation.flys.client.client.services.ChartInfoService;
35 import de.intevation.flys.client.client.services.ChartInfoServiceAsync; 37 import de.intevation.flys.client.client.services.ChartInfoServiceAsync;
36 import de.intevation.flys.client.client.ui.CollectionView; 38 import de.intevation.flys.client.client.ui.CollectionView;
66 protected Transform2D[] transformer; 68 protected Transform2D[] transformer;
67 69
68 /** The collection view.*/ 70 /** The collection view.*/
69 protected CollectionView view; 71 protected CollectionView view;
70 72
73 protected ChartThemePanel ctp;
74
71 75
72 /** The canvas that wraps the chart toolbar. */ 76 /** The canvas that wraps the chart toolbar. */
73 protected Canvas tbarPanel; 77 protected Canvas tbarPanel;
74 78
75 /** The canvas that wraps the theme editor. */ 79 /** The canvas that wraps the theme editor. */
127 hLayout.addMember(left); 131 hLayout.addMember(left);
128 hLayout.addMember(right); 132 hLayout.addMember(right);
129 133
130 // Output "cross_section" needs slightly modified ThemePanel 134 // Output "cross_section" needs slightly modified ThemePanel
131 // (with action buttons). 135 // (with action buttons).
132 ChartThemePanel ctp = null;
133 if (mode.getName().equals("cross_section")) { 136 if (mode.getName().equals("cross_section")) {
134 ctp = new CrossSectionChartThemePanel(collection, mode); 137 ctp = new CrossSectionChartThemePanel(collection, mode);
135 } 138 }
136 else { 139 else {
137 ctp = new ChartThemePanel(collection, mode); 140 ctp = new ChartThemePanel(collection, mode);
166 updateChartPanel(); 169 updateChartPanel();
167 updateChartInfo(); 170 updateChartInfo();
168 } 171 }
169 172
170 173
171 public void onRedrawRequest() { 174 public void onRedrawRequest(RedrawRequestEvent event) {
172 resetRanges(); 175 if (event.getType() == Type.RESET) {
176 resetRanges();
177 }
178 else {
179 ctp.updateCollection();
180 updateChartPanel();
181 updateChartInfo();
182 }
173 } 183 }
174 184
175 185
176 /** 186 /**
177 * Listens to change event in the chart them panel and updates chart after 187 * Listens to change event in the chart them panel and updates chart after

http://dive4elements.wald.intevation.org