Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java @ 552:6050d49eaba3
Adapted the ChartInfoService to return more information about charts than before. In addition, the PanControl is added to the chart toolbar.
flys-client/trunk@2066 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 07 Jun 2011 13:26:24 +0000 |
parents | 0f4095a522ab |
children | 8fa303586f14 |
comparison
equal
deleted
inserted
replaced
551:13c7f90917fc | 552:6050d49eaba3 |
---|---|
42 | 42 |
43 protected ImgButton zoomToMaxExtent; | 43 protected ImgButton zoomToMaxExtent; |
44 | 44 |
45 protected ImgButton zoomOut; | 45 protected ImgButton zoomOut; |
46 | 46 |
47 protected PanControl panControl; | |
48 | |
47 | 49 |
48 | 50 |
49 public ChartToolbar(CollectionView view, ChartOutputTab chartTab) { | 51 public ChartToolbar(CollectionView view, ChartOutputTab chartTab) { |
50 super(); | 52 super(); |
51 | 53 |
55 datacage = new Button(MSG.databasket()); | 57 datacage = new Button(MSG.databasket()); |
56 position = new MousePositionPanel(chartTab); | 58 position = new MousePositionPanel(chartTab); |
57 zoombox = new ZoomboxControl(chartTab, MSG.zoom_in()); | 59 zoombox = new ZoomboxControl(chartTab, MSG.zoom_in()); |
58 zoomToMaxExtent = new ImgButton(); | 60 zoomToMaxExtent = new ImgButton(); |
59 zoomOut = new ImgButton(); | 61 zoomOut = new ImgButton(); |
62 panControl = new PanControl(chartTab, MSG.pan()); | |
60 | 63 |
61 datacage.addClickHandler(new ClickHandler() { | 64 datacage.addClickHandler(new ClickHandler() { |
62 public void onClick(ClickEvent event) { | 65 public void onClick(ClickEvent event) { |
63 GWT.log("Clicked 'datacage' button."); | 66 GWT.log("Clicked 'datacage' button."); |
64 openDatacageWindow(getArtifact()); | 67 openDatacageWindow(getArtifact()); |
95 getChartOutputTab().zoomOut(10); | 98 getChartOutputTab().zoomOut(10); |
96 } | 99 } |
97 }); | 100 }); |
98 | 101 |
99 zoombox.addZoomHandler(chartTab); | 102 zoombox.addZoomHandler(chartTab); |
103 zoombox.addClickHandler(new ClickHandler() { | |
104 public void onClick(ClickEvent event) { | |
105 panControl.deselect(); | |
106 } | |
107 }); | |
108 | |
109 panControl.addPanHandler(chartTab); | |
110 panControl.addClickHandler(new ClickHandler() { | |
111 public void onClick(ClickEvent event) { | |
112 zoombox.deselect(); | |
113 } | |
114 }); | |
100 | 115 |
101 initLayout(); | 116 initLayout(); |
102 } | 117 } |
103 | 118 |
104 | 119 |
126 | 141 |
127 addMember(datacage); | 142 addMember(datacage); |
128 addMember(zoomToMaxExtent); | 143 addMember(zoomToMaxExtent); |
129 addMember(zoomOut); | 144 addMember(zoomOut); |
130 addMember(zoombox); | 145 addMember(zoombox); |
146 addMember(panControl); | |
131 addMember(spacer); | 147 addMember(spacer); |
132 addMember(position); | 148 addMember(position); |
133 } | 149 } |
134 | 150 |
135 | 151 |