diff flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java @ 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 0b576ca67cd5
line wrap: on
line diff
--- 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