changeset 1359:5ebcf5b3fc10

Display new attributes in editor window. flys-client/trunk@3045 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 20 Oct 2011 13:25:14 +0000
parents c437e4f0f7be
children ce0bbac13bc8
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java
diffstat 2 files changed, 36 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Thu Oct 20 09:11:49 2011 +0000
+++ b/flys-client/ChangeLog	Thu Oct 20 13:25:14 2011 +0000
@@ -1,3 +1,8 @@
+2011-10-20  Raimund Renkert <raimund.renkert@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java:
+	  Display new attributes in editor window.
+
 2011-10-20  Raimund Renkert <raimund.renkert@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java	Thu Oct 20 09:11:49 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java	Thu Oct 20 13:25:14 2011 +0000
@@ -167,12 +167,17 @@
         properties.addMember(f);
 
         String[] sets = {"showlines",
+                         "showpoints",
                          "linetype",
                          "linesize",
                          "linecolor",
                          "font",
+                         "textstyle",
                          "textsize",
-                         "textcolor"};
+                         "textcolor",
+                         "textorientation",
+                         "textbackground",
+                         "showbackground"};
 
         for (int i = 0; i < s.getNumSettings(); i ++) {
             StyleSetting set = s.getSetting(sets[i]);
@@ -225,15 +230,25 @@
             f.setValue(value);
         }
         else if (type.equals("boolean")) {
-            CheckboxItem c = new CheckboxItem(name, dname);
-            if(value.equals("true")) {
-                c.setValue(true);
+            if(name.equals("textorientation")) {
+                f = new SelectItem(name, dname);
+                LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>();
+                valueMap.put("true", "horizontal");
+                valueMap.put("false", "vertical");
+                f.setValueMap(valueMap);
+                f.setValue(value);
             }
             else {
-                c.setValue(false);
+                CheckboxItem c = new CheckboxItem(name, dname);
+                if(value.equals("true")) {
+                    c.setValue(true);
+                }
+                else {
+                    c.setValue(false);
+                }
+                c.setLabelAsTitle(true);
+                f = c;
             }
-            c.setLabelAsTitle(true);
-            f = c;
         }
         else if (type.equals("Color")) {
             ColorPickerItem c = new ColorPickerItem(name, dname);
@@ -272,6 +287,15 @@
             f.setValueMap(valueMap);
             f.setValue(value);
         }
+        else if (type.equals("Style")) {
+            f = new SelectItem(name, dname);
+            LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>();
+            valueMap.put("standard", "<span style='font-style:normal'>Normal</span>");
+            valueMap.put("bold", "<span style='font-weight:bold'>Bold</span>");
+            valueMap.put("italic", "<span style='font-style:italic'>Italic</span>");
+            f.setValueMap(valueMap);
+            f.setValue(value);
+        }
         else {
             f = new FormItem();
         }

http://dive4elements.wald.intevation.org