changeset 3513:c657c0bbcf8f

Updated to use split properties for logo placement. flys-client/trunk@5287 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 29 Aug 2012 08:00:44 +0000
parents b8a8ecdebc0d
children 1f293ada93d0
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/chart/ChartPropertiesEditor.java
diffstat 6 files changed, 47 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Tue Aug 28 15:54:38 2012 +0000
+++ b/flys-client/ChangeLog	Wed Aug 29 08:00:44 2012 +0000
@@ -1,3 +1,14 @@
+2012-08-29	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java:
+	  Special chart properties should trigger different ui (logo placement box).
+
+	* src/main/java/de/intevation/flys/client/client/FLYSConstants.java,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties:
+	  Added i18n strings for split logo-placement properties in charts.
+
 2012-08-28	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java	Tue Aug 28 15:54:38 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java	Wed Aug 29 08:00:44 2012 +0000
@@ -845,7 +845,9 @@
 
     String display_logo();
 
-    String logo_place();
+    String logo_placeh();
+
+    String logo_placev();
 
     String linetype();
 
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties	Tue Aug 28 15:54:38 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties	Wed Aug 29 08:00:44 2012 +0000
@@ -432,7 +432,8 @@
 subtitle = Subtitle
 display_grid = Display grid
 display_logo = Display logo
-logo_place = Place for logo
+logo_placeh = Horiz. Place for logo
+logo_placev = Vertic. Place for logo
 
 linetype = Linetype
 textstyle = Textstyle
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Tue Aug 28 15:54:38 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Wed Aug 29 08:00:44 2012 +0000
@@ -432,7 +432,8 @@
 subtitle = Untertitel
 display_grid = Gitterlinien anzeigen
 display_logo = Logo anzeigen
-logo_place = Logoort
+logo_placeh = Horizontale Ausrichtung Logo
+logo_placev = Vertikale Ausrichtung Logo
 
 linetype = Linientyp
 textstyle = Textstil
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties	Tue Aug 28 15:54:38 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties	Wed Aug 29 08:00:44 2012 +0000
@@ -433,7 +433,8 @@
 subtitle = Subtitle
 display_grid = Display grid
 display_logo = Display logo
-logo_place = Place for logo
+logo_placeh = Horiz. Place for logo
+logo_placev = Vertic. Place for logo
 
 linetype = Linetype
 textstyle = Textstyle
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java	Tue Aug 28 15:54:38 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java	Wed Aug 29 08:00:44 2012 +0000
@@ -337,13 +337,37 @@
             });
             return logoChooser;
         }
-        else if (choiceAttribute != null && choiceAttribute.equals("place")) {
+        else if (choiceAttribute != null && choiceAttribute.equals("placeh")) {
+            SelectItem placeChooser = new SelectItem();
+            LinkedHashMap valueMap = new LinkedHashMap<String, String>();
+            valueMap.put("right", "right");
+            valueMap.put("left", "left");
+            valueMap.put("center", "center");
+            placeChooser.setValueMap(valueMap);
+            placeChooser.setTitleStyle("color:#000;");
+            placeChooser.setTitleAlign(Alignment.LEFT);
+            placeChooser.setTitle(MSG.getString(name));
+            placeChooser.setTitleAlign(Alignment.LEFT);
+            placeChooser.addBlurHandler(new BlurHandler() {
+                public void onBlur(BlurEvent e) {
+                    String val;
+                    if (e.getItem().getValue() == null) {
+                        val = "";
+                    }
+                    else {
+                        val = e.getItem().getValue().toString();
+                    }
+                    sp.setValue(val);
+                }
+            });
+            return placeChooser;
+        }
+        else if (choiceAttribute != null && choiceAttribute.equals("placev")) {
             SelectItem placeChooser = new SelectItem();
             LinkedHashMap valueMap = new LinkedHashMap<String, String>();
             valueMap.put("top", "top");
             valueMap.put("bottom", "bottom");
-            valueMap.put("left", "left");
-            valueMap.put("right", "right");
+            valueMap.put("center", "center");
             placeChooser.setValueMap(valueMap);
             placeChooser.setTitleStyle("color:#000;");
             placeChooser.setTitleAlign(Alignment.LEFT);

http://dive4elements.wald.intevation.org