changeset 3808:5fab0fe3c445

Picked rev3356 and rev3358 from trunk. flys-client/tags/pre2.6-2011-12-05@3363 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 07 Dec 2011 14:03:23 +0000
parents 3f15d9c22d53
children f788d2d901d6
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties flys-client/src/main/java/de/intevation/flys/client/client/ui/map/ExternalWMSWindow.java flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java
diffstat 7 files changed, 59 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Mon Nov 28 16:40:03 2011 +0000
+++ b/flys-client/ChangeLog	Wed Dec 07 14:03:23 2011 +0000
@@ -1,3 +1,21 @@
+2011-12-06  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java:
+	  Reorder the layers in the map at the end of the layers initialization. A
+	  reordering is necessary, because the order in the map is reflected
+	  considering the order in the map theme panel.
+
+2011-12-05  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants.java: Added
+	  strings for buttons used in ExternalWMSWindow.
+
+	* src/main/java/de/intevation/flys/client/client/ui/map/ExternalWMSWindow.java:
+	  Use i18n strings for back, continue and cancel button.
+
 2011-11-28  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/map/CapabilitiesPanel.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java	Mon Nov 28 16:40:03 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java	Wed Dec 07 14:03:23 2011 +0000
@@ -546,6 +546,12 @@
 
     String addwmsLayerTitle();
 
+    String addwmsBack();
+
+    String addwmsContinue();
+
+    String addwmsCancel();
+
     String addwmsInvalidURL();
 
     String capabilitiesHint();
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties	Mon Nov 28 16:40:03 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties	Wed Dec 07 14:03:23 2011 +0000
@@ -282,6 +282,9 @@
 addwmsInputTitle = Base URL of WMS service
 addwmsInfoTitle = Information about WMS service
 addwmsLayerTitle = Choose Layer
+addwmsBack = Back
+addwmsContinue = Continue
+addwmsCancel = Cancel
 addwmsInvalidURL = The URL is not valid.
 capabilitiesHint = Please notice the information of the WMS service.
 capabilitiesTitle = Title
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Mon Nov 28 16:40:03 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Wed Dec 07 14:03:23 2011 +0000
@@ -282,6 +282,9 @@
 addwmsInputTitle = Basis URL des WMS Dienstes
 addwmsInfoTitle = Informationen des WMS Dienstes
 addwmsLayerTitle = Ebene ausw\u00e4hlen
+addwmsBack = Zur\u00fcck
+addwmsContinue = Weiter
+addwmsCancel = Abbrechen
 addwmsInvalidURL = Die URL ist nicht g\u00fcltig.
 capabilitiesHint = Bitte beachten Sie die folgenden Informationen des WMS-Dienstes.
 capabilitiesTitle = Titel
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties	Mon Nov 28 16:40:03 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties	Wed Dec 07 14:03:23 2011 +0000
@@ -282,6 +282,9 @@
 addwmsInputTitle = Base URL of WMS service
 addwmsInfoTitle = Information about WMS service
 addwmsLayerTitle = Choose Layer
+addwmsBack = Back
+addwmsContinue = Continue
+addwmsCancel = Cancel
 addwmsInvalidURL = The URL is not valid.
 capabilitiesHint = Please notice the information of the WMS service.
 capabilitiesTitle = Title
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/ExternalWMSWindow.java	Mon Nov 28 16:40:03 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/ExternalWMSWindow.java	Wed Dec 07 14:03:23 2011 +0000
@@ -294,9 +294,9 @@
         ClickHandler goHandler,
         ClickHandler cancelHandler
     ) {
-        Button back   = new Button("Back");
-        Button go     = new Button("Go on");
-        Button cancel = new Button("Cancel");
+        Button back   = new Button(MSG.addwmsBack());
+        Button go     = new Button(MSG.addwmsContinue());
+        Button cancel = new Button(MSG.addwmsCancel());
 
         if (backHandler != null) {
             back.addClickHandler(backHandler);
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java	Mon Nov 28 16:40:03 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java	Wed Dec 07 14:03:23 2011 +0000
@@ -17,6 +17,9 @@
 import com.smartgwt.client.widgets.menu.events.ClickHandler;
 import com.smartgwt.client.widgets.menu.events.MenuItemClickEvent;
 
+import org.gwtopenmaps.openlayers.client.Map;
+import org.gwtopenmaps.openlayers.client.layer.Layer;
+
 import de.intevation.flys.client.shared.MapUtils;
 import de.intevation.flys.client.shared.model.AttributedTheme;
 import de.intevation.flys.client.shared.model.Collection;
@@ -195,6 +198,26 @@
     }
 
 
+    /**
+     * This method calls super.updateGrid() at first. Finally, it is used to
+     * reorder the layers in the map. The first layer added to the map is the
+     * layer which is least visible. So, the order needs to be reflected.
+     */
+    @Override
+    protected void updateGrid() {
+        super.updateGrid();
+
+        Map map = mapOut.getMap();
+        int num = map.getNumLayers() - 1; // without the vector layer
+
+        Layer[] layers = map.getLayers();
+
+        for (int i = 1; i < num; i++) {
+            map.raiseLayer(layers[i], num-i);
+        }
+    }
+
+
     @Override
     protected void addFacetRecord(FacetRecord rec) {
         Theme newTheme = rec.getTheme();

http://dive4elements.wald.intevation.org