changeset 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 c1292aab6aa9
children ec120dc6279b
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/Toolbar.java flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java
diffstat 4 files changed, 41 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Thu Mar 08 15:33:42 2012 +0000
+++ b/flys-client/ChangeLog	Thu Mar 08 15:39:29 2012 +0000
@@ -1,3 +1,15 @@
+2012-03-08  Raimund Renkert <raimund.renkert@intevation.de>
+
+	Issue 563.
+
+	* src/main/java/de/intevation/flys/client/client/ui/Toolbar.java:
+	  Set overflow to 'auto'.
+
+	* src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java,
+	  src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java:
+	  Added resize handler to increase or decrease the height if a scrollbar
+	  is visible.
+
 2012-03-08  Raimund Renkert <raimund.renkert@intevation.de>
 
 	Issue 553.
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/Toolbar.java	Thu Mar 08 15:33:42 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/Toolbar.java	Thu Mar 08 15:39:29 2012 +0000
@@ -3,6 +3,7 @@
 import com.smartgwt.client.widgets.layout.HLayout;
 import com.smartgwt.client.widgets.events.CloseClickHandler;
 import com.smartgwt.client.widgets.events.CloseClickEvent;
+import com.smartgwt.client.types.Overflow;
 
 import de.intevation.flys.client.shared.model.Artifact;
 import de.intevation.flys.client.shared.model.User;
@@ -17,6 +18,7 @@
 
     public Toolbar(OutputTab outputTab) {
         super();
+        setOverflow(Overflow.AUTO);
 
         this.outputTab = outputTab;
     }
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java	Thu Mar 08 15:33:42 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java	Thu Mar 08 15:39:29 2012 +0000
@@ -8,6 +8,8 @@
 import com.smartgwt.client.widgets.Label;
 import com.smartgwt.client.widgets.events.ClickEvent;
 import com.smartgwt.client.widgets.events.ClickHandler;
+import com.smartgwt.client.widgets.events.ResizedEvent;
+import com.smartgwt.client.widgets.events.ResizedHandler;
 
 import de.intevation.flys.client.client.FLYSConstants;
 import de.intevation.flys.client.client.event.ZoomEvent;
@@ -160,6 +162,16 @@
 
 
         initLayout();
+        addResizedHandler(new ResizedHandler() {
+            public void onResized(ResizedEvent e) {
+                if (getVisibleWidth() < 740) {
+                    setHeight(55);
+                }
+                else {
+                    setHeight(40);
+                }
+            }
+        });
     }
 
     /** Set width, height and other properties of an imagebutton. */
--- 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