Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java @ 2452:0235cdb62c98
Issue 563.
Handle the size of the toolbar to show all elements.
flys-client/trunk@4135 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 08 Mar 2012 15:39:29 +0000 |
parents | 90c339e26a0a |
children | a1ff911e8365 |
comparison
equal
deleted
inserted
replaced
2451:c1292aab6aa9 | 2452:0235cdb62c98 |
---|---|
6 import com.smartgwt.client.widgets.Canvas; | 6 import com.smartgwt.client.widgets.Canvas; |
7 import com.smartgwt.client.widgets.ImgButton; | 7 import com.smartgwt.client.widgets.ImgButton; |
8 import com.smartgwt.client.widgets.Label; | 8 import com.smartgwt.client.widgets.Label; |
9 import com.smartgwt.client.widgets.events.ClickEvent; | 9 import com.smartgwt.client.widgets.events.ClickEvent; |
10 import com.smartgwt.client.widgets.events.ClickHandler; | 10 import com.smartgwt.client.widgets.events.ClickHandler; |
11 import com.smartgwt.client.widgets.events.ResizedEvent; | |
12 import com.smartgwt.client.widgets.events.ResizedHandler; | |
11 | 13 |
12 import de.intevation.flys.client.client.FLYSConstants; | 14 import de.intevation.flys.client.client.FLYSConstants; |
13 import de.intevation.flys.client.client.event.ZoomEvent; | 15 import de.intevation.flys.client.client.event.ZoomEvent; |
14 import de.intevation.flys.client.client.event.ZoomHandler; | 16 import de.intevation.flys.client.client.event.ZoomHandler; |
15 import de.intevation.flys.client.client.ui.ImgLink; | 17 import de.intevation.flys.client.client.ui.ImgLink; |
158 } | 160 } |
159 }); | 161 }); |
160 | 162 |
161 | 163 |
162 initLayout(); | 164 initLayout(); |
165 addResizedHandler(new ResizedHandler() { | |
166 public void onResized(ResizedEvent e) { | |
167 if (getVisibleWidth() < 740) { | |
168 setHeight(55); | |
169 } | |
170 else { | |
171 setHeight(40); | |
172 } | |
173 } | |
174 }); | |
163 } | 175 } |
164 | 176 |
165 /** Set width, height and other properties of an imagebutton. */ | 177 /** Set width, height and other properties of an imagebutton. */ |
166 public void adjustImageButton(ImgButton imgButton) { | 178 public void adjustImageButton(ImgButton imgButton) { |
167 imgButton.setWidth(20); | 179 imgButton.setWidth(20); |