changeset 8600:d23982357c79

(issue1753) Fix editing the point color (not Color) of SQThemes. Theme handling was already done case insensitive for some things but not for all. This is better as it makes the theme documents more robust and there is no ambiguity in the supported keywords.
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 20 Mar 2015 15:04:25 +0100
parents 8641ce84a4b3
children 5b568f7f18bc
files gwt-client/src/main/java/org/dive4elements/river/client/client/ui/StyleEditorWindow.java
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/StyleEditorWindow.java	Fri Mar 20 14:31:14 2015 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/StyleEditorWindow.java	Fri Mar 20 15:04:25 2015 +0100
@@ -350,8 +350,8 @@
 
             DynamicForm property = createPropertyUI(
                 set.getDisplayName(),
-                set.getName(),
-                set.getType(),
+                set.getName().toLowerCase(),
+                set.getType().toLowerCase(),
                 set.getDefaultValue());
             if (property != null) {
                 vl.addMember(property);
@@ -477,7 +477,7 @@
                 f = c;
             }
         }
-        else if (type.equals("Color")) {
+        else if (type.equals("color")) {
             ColorPickerItem c = new ColorPickerItem(name, MSG.getString(name));
             c.setValue(rgbToHtml(value));
             f = c;
@@ -504,7 +504,7 @@
             });
             f.setValue(value);
         }
-        else if (type.equals("Dash")) {
+        else if (type.equals("dash")) {
             f = new SelectItem(name, MSG.getString(name));
             LinkedHashMap<String, String> valueIcons = new LinkedHashMap<String, String>();
             f.setImageURLPrefix(GWT.getHostPageBaseURL() + "images/linestyle-dash-");
@@ -526,7 +526,7 @@
             f.setValueMap(valueMap);
             f.setValue(value);
         }
-        else if (type.equals("Font")) {
+        else if (type.equals("font")) {
             f = new SelectItem(name, MSG.getString(name));
             LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>();
             valueMap.put("arial", "<span style='font-family:arial'>Arial</span>");
@@ -536,7 +536,7 @@
             f.setValueMap(valueMap);
             f.setValue(value);
         }
-        else if (type.equals("Style")) {
+        else if (type.equals("style")) {
             f = new SelectItem(name, MSG.getString(name));
             LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>();
             valueMap.put("standard", "<span style='font-style:normal'>Normal</span>");
@@ -545,7 +545,7 @@
             f.setValueMap(valueMap);
             f.setValue(value);
         }
-        else if (type.equals("Symbol")) {
+        else if (type.equals("symbol")) {
             //create an empty element as long as this property can not be
             //changed.
             f = new StaticTextItem("");

http://dive4elements.wald.intevation.org