# HG changeset patch # User Ingo Weinzierl # Date 1323700791 0 # Node ID d73f503f2465657ee1d845f600b48caa07c8e7e6 # Parent 40f4137a2c31310c139829d0c12892246bcfb280 Added a label that displays the current map projection to the MapToolbar. flys-client/trunk@3388 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 40f4137a2c31 -r d73f503f2465 flys-client/ChangeLog --- a/flys-client/ChangeLog Mon Dec 12 09:11:28 2011 +0000 +++ b/flys-client/ChangeLog Mon Dec 12 14:39:51 2011 +0000 @@ -1,3 +1,16 @@ +2011-12-12 Ingo Weinzierl + + * src/main/java/de/intevation/flys/client/client/ui/map/MapPositionPanel.java: + Set width to 150px and set alignment to RIGHT. + + * src/main/java/de/intevation/flys/client/client/ui/map/MeasureControl.java: + Set width to 100. + + * src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java: + Added a label that displays the current projection. Wrapped this label and + the mouse coordinates into a new layout which is RIGHT aligned in the + toolbar. + 2011-12-12 Ingo Weinzierl * src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties, diff -r 40f4137a2c31 -r d73f503f2465 flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPositionPanel.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPositionPanel.java Mon Dec 12 09:11:28 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPositionPanel.java Mon Dec 12 14:39:51 2011 +0000 @@ -1,5 +1,6 @@ package de.intevation.flys.client.client.ui.map; +import com.smartgwt.client.types.Alignment; import com.smartgwt.client.widgets.Label; import com.smartgwt.client.widgets.layout.HLayout; @@ -31,9 +32,10 @@ this.y = new Label(); Label d = new Label("|"); - setWidth(60); + setAlign(Alignment.RIGHT); setMembersMargin(2); + setWidth(150); x.setWidth(25); y.setWidth(25); d.setWidth(5); diff -r 40f4137a2c31 -r d73f503f2465 flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java Mon Dec 12 09:11:28 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java Mon Dec 12 14:39:51 2011 +0000 @@ -2,13 +2,16 @@ import com.google.gwt.core.client.GWT; +import com.smartgwt.client.types.Alignment; import com.smartgwt.client.types.SelectionType; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.Button; import com.smartgwt.client.widgets.Canvas; import com.smartgwt.client.widgets.ImgButton; +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.layout.HLayout; import org.gwtopenmaps.openlayers.client.Map; import org.gwtopenmaps.openlayers.client.control.DragPan; @@ -50,6 +53,8 @@ protected ImgButton removeButton; protected ImgButton elevationButton; + protected Label epsgLabel; + protected DrawControl drawControl; protected MeasureControl measureControl; @@ -92,6 +97,7 @@ position = createMousePosition(); removeButton = createRemoveFeatureControl(); elevationButton = createElevationControl(); + epsgLabel = createEPSGLabel(); if (mapTab != null) { datacageButton = createDatacageControl(); @@ -118,7 +124,18 @@ } addMember(measureControl); - addMember(position); + addMember(createRightPanel()); + } + + + protected HLayout createRightPanel() { + HLayout right = new HLayout(); + right.setAlign(Alignment.RIGHT); + + right.addMember(epsgLabel); + right.addMember(position); + + return right; } @@ -535,5 +552,15 @@ return add; } + + + protected Label createEPSGLabel() { + Label epsgLabel = new Label(floodMap.getRiverProjection()); + + epsgLabel.setAlign(Alignment.RIGHT); + epsgLabel.setWidth(75); + + return epsgLabel; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r 40f4137a2c31 -r d73f503f2465 flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MeasureControl.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MeasureControl.java Mon Dec 12 09:11:28 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MeasureControl.java Mon Dec 12 14:39:51 2011 +0000 @@ -58,7 +58,11 @@ protected void initLayout() { + setWidth(100); setMembersMargin(2); + + label.setWidth(75); + addMember(measureLineButton); addMember(measurePolyButton); addMember(label);