Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java @ 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 |
parents | 750a53950e9f |
children | 1695d66896f9 |
line wrap: on
line diff
--- 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 :