# HG changeset patch # User Felix Wolfsteller # Date 1346666917 0 # Node ID a1610c7e4a4e6a278dfc8aaab77f279258ac2365 # Parent 75a3a41a6e517a9f9bf6362f73045125dd662b23 Show logos in select box. flys-client/trunk@5345 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 75a3a41a6e51 -r a1610c7e4a4e flys-client/ChangeLog --- a/flys-client/ChangeLog Sat Sep 01 09:06:29 2012 +0000 +++ b/flys-client/ChangeLog Mon Sep 03 10:08:37 2012 +0000 @@ -1,3 +1,15 @@ +2012-09-03 Felix Wolfsteller + + Show logos in selectbox in chart properties such that user gets a + visual idea of what she selects. + + * src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java: + Show icons in select box that displays the chosen logo. + + * src/main/webapp/images/logo-intevation.png, + src/main/webapp/images/logo-bfg.gif: + Two exemplary logos (copies in flys-artifacts). + 2012-09-01 Sascha L. Teichmann * src/main/java/de/intevation/flys/client/server/ModuleServiceImpl.java, diff -r 75a3a41a6e51 -r a1610c7e4a4e 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 Sat Sep 01 09:06:29 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java Mon Sep 03 10:08:37 2012 +0000 @@ -316,10 +316,28 @@ if (choiceAttribute != null && choiceAttribute.equals("logo")) { SelectItem logoChooser = new SelectItem(); + logoChooser.setImageURLPrefix(GWT.getHostPageBaseURL() + "images/logo-"); + logoChooser.setValueIconHeight(50); + logoChooser.setValueIconWidth(100); + LinkedHashMap valueMap = new LinkedHashMap(); + LinkedHashMap valueIcons = new LinkedHashMap(); valueMap.put("none", MSG.getString("none")); - valueMap.put("BfG", "Bfg"); + /* + If you want to add images, remember to change code in these places: + flys-artifacts: + XYChartGenerator.java + Timeseries*Generator.java and + in the flys-client projects Chart*Propert*Editor.java. + Also, these images have to be put in + flys-artifacts/src/main/resources/images/ + flys-client/src/main/webapp/images/ + */ + valueMap.put("BfG", "BfG"); valueMap.put("Intevation", "Intevation"); + valueIcons.put("BfG", "bfg.gif"); + valueIcons.put("Intevation", "intevation.png"); + logoChooser.setValueIcons(valueIcons); logoChooser.setValueMap(valueMap); logoChooser.setTitleStyle("color:#000;"); logoChooser.setTitleAlign(Alignment.LEFT); diff -r 75a3a41a6e51 -r a1610c7e4a4e flys-client/src/main/webapp/images/logo-bfg.gif Binary file flys-client/src/main/webapp/images/logo-bfg.gif has changed diff -r 75a3a41a6e51 -r a1610c7e4a4e flys-client/src/main/webapp/images/logo-intevation.png Binary file flys-client/src/main/webapp/images/logo-intevation.png has changed