Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java @ 3347:6d749af6a9c2
Issue #726 work.
flys-client/trunk@5022 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Tue, 17 Jul 2012 11:45:35 +0000 |
parents | 725470fc57d2 |
children | 08b2472111aa |
comparison
equal
deleted
inserted
replaced
3346:f2039d030b5e | 3347:6d749af6a9c2 |
---|---|
5 import com.smartgwt.client.widgets.Canvas; | 5 import com.smartgwt.client.widgets.Canvas; |
6 import com.smartgwt.client.widgets.ImgButton; | 6 import com.smartgwt.client.widgets.ImgButton; |
7 import com.smartgwt.client.widgets.Label; | 7 import com.smartgwt.client.widgets.Label; |
8 import com.smartgwt.client.widgets.events.ClickEvent; | 8 import com.smartgwt.client.widgets.events.ClickEvent; |
9 import com.smartgwt.client.widgets.events.ClickHandler; | 9 import com.smartgwt.client.widgets.events.ClickHandler; |
10 import com.smartgwt.client.widgets.events.ResizedEvent; | |
11 import com.smartgwt.client.widgets.events.ResizedHandler; | |
12 | 10 |
13 import de.intevation.flys.client.client.FLYSConstants; | 11 import de.intevation.flys.client.client.FLYSConstants; |
14 import de.intevation.flys.client.client.event.ZoomEvent; | 12 import de.intevation.flys.client.client.event.ZoomEvent; |
15 import de.intevation.flys.client.client.event.ZoomHandler; | 13 import de.intevation.flys.client.client.event.ZoomHandler; |
16 import de.intevation.flys.client.client.ui.ImgLink; | 14 import de.intevation.flys.client.client.ui.ImgLink; |
25 */ | 23 */ |
26 public class ChartToolbar extends Toolbar implements ZoomHandler { | 24 public class ChartToolbar extends Toolbar implements ZoomHandler { |
27 | 25 |
28 protected static FLYSConstants MSG = GWT.create(FLYSConstants.class); | 26 protected static FLYSConstants MSG = GWT.create(FLYSConstants.class); |
29 | 27 |
30 public static final int PANEL_HEIGHT = 30; | 28 public static final int PANEL_HEIGHT = 35; |
31 | 29 |
32 protected Button manageThemes; | 30 protected Button manageThemes; |
33 protected Button datacage; | 31 protected Button datacage; |
34 protected ImgLink downloadPNG; | 32 protected ImgLink downloadPNG; |
35 protected ImgLink downloadPDF; | 33 protected ImgLink downloadPDF; |
191 } | 189 } |
192 }); | 190 }); |
193 chartProperties.setTooltip(MSG.chartPropertiesTooltip()); | 191 chartProperties.setTooltip(MSG.chartPropertiesTooltip()); |
194 | 192 |
195 initLayout(); | 193 initLayout(); |
196 addResizedHandler(new ResizedHandler() { | |
197 @Override | |
198 public void onResized(ResizedEvent e) { | |
199 if (getVisibleWidth() < 740) { | |
200 setHeight(55); | |
201 } | |
202 else { | |
203 setHeight(40); | |
204 } | |
205 } | |
206 }); | |
207 } | 194 } |
208 | 195 |
209 /** Set width, height and other properties of an imagebutton. */ | 196 /** Set width, height and other properties of an imagebutton. */ |
210 public void adjustImageButton(ImgButton imgButton) { | 197 public void adjustImageButton(ImgButton imgButton) { |
211 imgButton.setWidth(20); | 198 imgButton.setWidth(20); |