# HG changeset patch # User Felix Wolfsteller # Date 1346227244 0 # Node ID c657c0bbcf8f86014aeba0b080ee5dbb11fa320b # Parent b8a8ecdebc0d9ff6d3e5cbda08d46c6c35924ec6 Updated to use split properties for logo placement. flys-client/trunk@5287 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r b8a8ecdebc0d -r c657c0bbcf8f flys-client/ChangeLog --- a/flys-client/ChangeLog Tue Aug 28 15:54:38 2012 +0000 +++ b/flys-client/ChangeLog Wed Aug 29 08:00:44 2012 +0000 @@ -1,3 +1,14 @@ +2012-08-29 Felix Wolfsteller + + * src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java: + Special chart properties should trigger different ui (logo placement box). + + * src/main/java/de/intevation/flys/client/client/FLYSConstants.java, + src/main/java/de/intevation/flys/client/client/FLYSConstants.properties, + src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties, + src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties: + Added i18n strings for split logo-placement properties in charts. + 2012-08-28 Felix Wolfsteller * src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java: diff -r b8a8ecdebc0d -r c657c0bbcf8f 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 Tue Aug 28 15:54:38 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java Wed Aug 29 08:00:44 2012 +0000 @@ -845,7 +845,9 @@ String display_logo(); - String logo_place(); + String logo_placeh(); + + String logo_placev(); String linetype(); diff -r b8a8ecdebc0d -r c657c0bbcf8f 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 Tue Aug 28 15:54:38 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties Wed Aug 29 08:00:44 2012 +0000 @@ -432,7 +432,8 @@ subtitle = Subtitle display_grid = Display grid display_logo = Display logo -logo_place = Place for logo +logo_placeh = Horiz. Place for logo +logo_placev = Vertic. Place for logo linetype = Linetype textstyle = Textstyle diff -r b8a8ecdebc0d -r c657c0bbcf8f 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 Tue Aug 28 15:54:38 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties Wed Aug 29 08:00:44 2012 +0000 @@ -432,7 +432,8 @@ subtitle = Untertitel display_grid = Gitterlinien anzeigen display_logo = Logo anzeigen -logo_place = Logoort +logo_placeh = Horizontale Ausrichtung Logo +logo_placev = Vertikale Ausrichtung Logo linetype = Linientyp textstyle = Textstil diff -r b8a8ecdebc0d -r c657c0bbcf8f 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 Tue Aug 28 15:54:38 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties Wed Aug 29 08:00:44 2012 +0000 @@ -433,7 +433,8 @@ subtitle = Subtitle display_grid = Display grid display_logo = Display logo -logo_place = Place for logo +logo_placeh = Horiz. Place for logo +logo_placev = Vertic. Place for logo linetype = Linetype textstyle = Textstyle diff -r b8a8ecdebc0d -r c657c0bbcf8f flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java --- 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(); + 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(); 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);