Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java @ 2925:6461b8dbe093
Added basic GUI for manual WSPs in cross sections.
flys-client/trunk@4815 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 27 Jun 2012 15:31:52 +0000 |
parents | ab0014c58ecb |
children | 59491a730461 |
comparison
equal
deleted
inserted
replaced
2924:60c375173263 | 2925:6461b8dbe093 |
---|---|
53 protected ImgButton zoomOut; | 53 protected ImgButton zoomOut; |
54 | 54 |
55 protected ImgButton chartProperties; | 55 protected ImgButton chartProperties; |
56 | 56 |
57 protected Button addPoints; | 57 protected Button addPoints; |
58 | |
59 protected Button addWSP; | |
58 | 60 |
59 protected PanControl panControl; | 61 protected PanControl panControl; |
60 | 62 |
61 | 63 |
62 /** @param chartTab Output-Tab on which this toolbar is located. */ | 64 /** @param chartTab Output-Tab on which this toolbar is located. */ |
71 zoomOut = new ImgButton(); | 73 zoomOut = new ImgButton(); |
72 historyBack = new ImgButton(); | 74 historyBack = new ImgButton(); |
73 panControl = new PanControl(chartTab, MSG.pan()); | 75 panControl = new PanControl(chartTab, MSG.pan()); |
74 chartProperties = new ImgButton(); | 76 chartProperties = new ImgButton(); |
75 addPoints = new Button(MSG.points()); | 77 addPoints = new Button(MSG.points()); |
78 | |
79 if (this.chartTab.getMode().getName().equals("cross_section")) { | |
80 addWSP = new Button(MSG.addWSP()); | |
81 addWSP.setTooltip(MSG.addPointsTooltip()); | |
82 final ChartOutputTab finalChartTab = chartTab; | |
83 addWSP.addClickHandler(new ClickHandler() { | |
84 public void onClick(ClickEvent ce) { | |
85 new ManualWSPEditor(finalChartTab.getView().getCollection(), | |
86 finalChartTab, finalChartTab.getMode().getName()).show(); | |
87 }}); | |
88 } | |
76 | 89 |
77 addPoints.addClickHandler(new ClickHandler() { | 90 addPoints.addClickHandler(new ClickHandler() { |
78 public void onClick(ClickEvent event) { | 91 public void onClick(ClickEvent event) { |
79 openPointWindow(); | 92 openPointWindow(); |
80 } | 93 } |
231 addMember(zoomOut); | 244 addMember(zoomOut); |
232 addMember(zoombox); | 245 addMember(zoombox); |
233 addMember(panControl); | 246 addMember(panControl); |
234 addMember(chartProperties); | 247 addMember(chartProperties); |
235 addMember(addPoints); | 248 addMember(addPoints); |
249 | |
250 if (this.chartTab.getMode().getName().equals("cross_section")) { | |
251 // TODO i18n manual wsp | |
252 addMember(addWSP); | |
253 } | |
254 | |
236 addMember(spacer); | 255 addMember(spacer); |
237 addMember(position); | 256 addMember(position); |
238 } | 257 } |
239 | 258 |
240 /** | 259 /** |