# HG changeset patch # User Ingo Weinzierl # Date 1333546265 0 # Node ID 75d19d46c3cde2fcde904b832a221facd78be8de # Parent a1ff911e83659c7aed7b9473cb137cfb388bc61c Prepared the style editor for WSPLGEN themes. flys-client/trunk@4196 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r a1ff911e8365 -r 75d19d46c3cd flys-client/ChangeLog --- 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 + + * 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 * src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties, diff -r a1ff911e8365 -r 75d19d46c3cd flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java --- 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(); diff -r a1ff911e8365 -r 75d19d46c3cd flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties --- 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 diff -r a1ff911e8365 -r 75d19d46c3cd flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties --- 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 diff -r a1ff911e8365 -r 75d19d46c3cd flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties --- 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 diff -r a1ff911e8365 -r 75d19d46c3cd flys-client/src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java --- 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);