changeset 2472:75d19d46c3cd

Prepared the style editor for WSPLGEN themes. flys-client/trunk@4196 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 04 Apr 2012 13:31:05 +0000 (2012-04-04)
parents a1ff911e8365
children 9fa513b7955b
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/StyleEditorWindow.java
diffstat 6 files changed, 47 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Wed Apr 04 07:20:08 2012 +0000
+++ b/flys-client/ChangeLog	Wed Apr 04 13:31:05 2012 +0000
@@ -1,3 +1,15 @@
+2012-04-04  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
+	  titles for WSPLGEN layer depths.
+
+	* src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java:
+	  Improved the layout of the window; convert HTML string into a RGB color
+	  if the type of a theme field is 'color'.
+
 2012-04-04  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties,
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java	Wed Apr 04 07:20:08 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java	Wed Apr 04 13:31:05 2012 +0000
@@ -784,6 +784,16 @@
 
     String fillcolor();
 
+    String wsplgen_cat1();
+
+    String wsplgen_cat2();
+
+    String wsplgen_cat3();
+
+    String wsplgen_cat4();
+
+    String wsplgen_cat5();
+
     // Manual Points editor
 
     String addpoints();
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties	Wed Apr 04 07:20:08 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties	Wed Apr 04 13:31:05 2012 +0000
@@ -402,6 +402,11 @@
 transparent = Transparency
 showarea = Show Area
 fillcolor = Fill Color
+wsplgen_cat1 = Fill Color 0.0 <= DIFF < 1
+wsplgen_cat2 = Fill Color 1.0 <= DIFF < 2
+wsplgen_cat3 = Fill Color 2.0 <= DIFF < 3
+wsplgen_cat4 = Fill Color 3.0 <= DIFF < 4
+wsplgen_cat5 = Fill Color 4.0 <= DIFF
 
 # Manual Points Editor
 addpoints = Add points
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Wed Apr 04 07:20:08 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Wed Apr 04 13:31:05 2012 +0000
@@ -402,6 +402,11 @@
 transparent = Transparenz
 showarea = Fl\u00e4che anzeigen
 fillcolor = F\u00fcllfarbe
+wsplgen_cat1 = F\u00fcllfarbe 0.0 <= DIFF < 1
+wsplgen_cat2 = F\u00fcllfarbe 1.0 <= DIFF < 2
+wsplgen_cat3 = F\u00fcllfarbe 2.0 <= DIFF < 3
+wsplgen_cat4 = F\u00fcllfarbe 3.0 <= DIFF < 4
+wsplgen_cat5 = F\u00fcllfarbe 4.0 <= DIFF
 
 # Manual Points Editor
 addpoints = Punkte hinzuf\u00fcgen
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties	Wed Apr 04 07:20:08 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties	Wed Apr 04 13:31:05 2012 +0000
@@ -400,6 +400,11 @@
 transparent = Transparency
 showarea = Show Area
 fillcolor = Fill Color
+wsplgen_cat1 = Fill Color 0.0 <= DIFF < 1
+wsplgen_cat2 = Fill Color 1.0 <= DIFF < 2
+wsplgen_cat3 = Fill Color 2.0 <= DIFF < 3
+wsplgen_cat4 = Fill Color 3.0 <= DIFF < 4
+wsplgen_cat5 = Fill Color 4.0 <= DIFF
 
 # Manual Points Editor
 addpoints = Add points
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java	Wed Apr 04 07:20:08 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java	Wed Apr 04 13:31:05 2012 +0000
@@ -128,7 +128,7 @@
         layout.addMember(propGrid);
         layout.addMember(buttons);
         addItem(layout);
-        setWidth(300);
+        setWidth(400);
         setHeight(410);
     }
 
@@ -163,12 +163,14 @@
 
         StaticTextItem name = new StaticTextItem("name", "Name");
         name.setValue(facet.getName());
-        name.setTitleStyle("color:#000; width:120px");
+        name.setTitleStyle("color:#000;");
         name.setTitleAlign(Alignment.LEFT);
         name.setDisabled(true);
         name.setShowDisabled(false);
         DynamicForm form = new DynamicForm();
         form.setFields(name);
+        form.setColWidths("40%", "60%");
+
         properties.addMember(form);
 
         if (style == null) {
@@ -241,6 +243,7 @@
         String value)
     {
         DynamicForm df = new DynamicForm();
+        df.setColWidths("40%", "60%");
 
         FormItem f;
         if(type.equals("int")) {
@@ -348,7 +351,7 @@
         else {
             f = new FormItem();
         }
-        f.setTitleStyle("color:#000; width:120px");
+        f.setTitleStyle("color:#000;");
         f.setTitleAlign(Alignment.LEFT);
         df.setFields(f);
         df.addItemChangedHandler(new ItemChangedHandler() {
@@ -477,7 +480,10 @@
         Theme t = facet.getTheme();
         Style s = attributes.getStyle(t.getFacet(), t.getIndex());
         StyleSetting set = s.getSetting(name);
-        if(name.indexOf("color") != -1) {
+        String type = set.getType();
+
+        if(name.indexOf("color") != -1
+           || (type != null && type.toLowerCase().indexOf("color") > -1)) {
             value = htmlToRgb(value);
         }
         set.setDefaultValue(value);

http://dive4elements.wald.intevation.org