changeset 539:fea93eebd2fa

Improved the layout of the mouse position panel. flys-client/trunk@2039 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 01 Jun 2011 11:59:59 +0000
parents 75df57220104
children a866cdf1ca40
files flys-client/ChangeLog 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/chart/MousePositionPanel.java
diffstat 3 files changed, 27 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Wed Jun 01 09:03:18 2011 +0000
+++ b/flys-client/ChangeLog	Wed Jun 01 11:59:59 2011 +0000
@@ -1,3 +1,12 @@
+2011-06-01  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java:
+	  Moved the mouse position panel to the right border of the toolbar panel.
+
+	* src/main/java/de/intevation/flys/client/client/ui/chart/MousePositionPanel.java:
+	  Improved the layout of this HLayout panel. It has a fixed width of 195px
+	  now. The components inside this panel have also fixed width values.
+
 2011-06-01  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java	Wed Jun 01 09:03:18 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java	Wed Jun 01 11:59:59 2011 +0000
@@ -71,12 +71,10 @@
         setPadding(5);
         setBorder("1px solid black");
 
-        // TODO do this dynamic
         Label spacer = new Label();
-        spacer.setWidth("100px");
+        spacer.setWidth("*");
         datacage.setWidth("95px");
         position.setWidth("200px");
-        position.setLayoutAlign(com.smartgwt.client.types.Alignment.RIGHT);
 
         addMember(datacage);
         addMember(spacer);
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/MousePositionPanel.java	Wed Jun 01 09:03:18 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/MousePositionPanel.java	Wed Jun 01 11:59:59 2011 +0000
@@ -42,24 +42,32 @@
 
 
     /**
-     * Initializes the layout of this component.
+     * Initializes the layout of this component. <b>Note:</b> This layout has a
+     * fixed width of 195px plus a margin of 5px.
      */
     protected void initLayout() {
-        setLayoutAlign(Alignment.RIGHT);
         setMembersMargin(5);
 
         Label xDesc = new Label("Position: X = ");
         Label yDesc  = new Label("Y = ");
 
-        xDesc.setWidth(60);
-        x.setWidth(25);
+        HLayout xLayout = new HLayout();
+        xLayout.setWidth(125);
+        xLayout.addMember(xDesc);
+        xLayout.addMember(x);
+
+        HLayout yLayout = new HLayout();
+        yLayout.setWidth(70);
+        yLayout.addMember(yDesc);
+        yLayout.addMember(y);
+
+        xDesc.setWidth(70);
+        x.setWidth(55);
         yDesc.setWidth(20);
-        y.setWidth(25);
+        y.setWidth(50);
 
-        addMember(xDesc);
-        addMember(x);
-        addMember(yDesc);
-        addMember(y);
+        addMember(xLayout);
+        addMember(yLayout);
     }
 
 

http://dive4elements.wald.intevation.org