Mercurial > dive4elements > river
changeset 1433:d73f503f2465
Added a label that displays the current map projection to the MapToolbar.
flys-client/trunk@3388 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 12 Dec 2011 14:39:51 +0000 (2011-12-12) |
parents | 40f4137a2c31 |
children | 9115b2a28be1 |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPositionPanel.java flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MeasureControl.java |
diffstat | 4 files changed, 48 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 <ingo@intevation.de> + + * 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 <ingo@intevation.de> * src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties,
--- 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);
--- 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 :
--- 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);