diff flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.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 e73e92c70290
children 505e68d8d131
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java	Thu Mar 08 15:33:42 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java	Thu Mar 08 15:39:29 2012 +0000
@@ -12,6 +12,8 @@
 import com.smartgwt.client.widgets.events.ClickEvent;
 import com.smartgwt.client.widgets.events.ClickHandler;
 import com.smartgwt.client.widgets.layout.HLayout;
+import com.smartgwt.client.widgets.events.ResizedEvent;
+import com.smartgwt.client.widgets.events.ResizedHandler;
 
 import org.gwtopenmaps.openlayers.client.Map;
 import org.gwtopenmaps.openlayers.client.control.DragPan;
@@ -79,11 +81,10 @@
         super(mapTab);
 
         setWidth100();
-        setHeight(30);
+        setHeight(38);
         setMembersMargin(10);
         setPadding(5);
         setBorder("1px solid black");
-
         this.floodMap = floodMap;
 
         zoomToMaxButton = createMaxExtentControl();
@@ -125,6 +126,18 @@
 
         addMember(measureControl);
         addMember(createRightPanel());
+
+        addResizedHandler(new ResizedHandler() {
+            public void onResized(ResizedEvent e) {
+                if (getVisibleWidth() < 656) {
+                    setHeight(55);
+                }
+                else {
+                    setHeight(38);
+                }
+            }
+        });
+
     }
 
 

http://dive4elements.wald.intevation.org