Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java @ 3536:a1610c7e4a4e
Show logos in select box.
flys-client/trunk@5345 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 03 Sep 2012 10:08:37 +0000 |
parents | 0b576ca67cd5 |
children | 45f2b0778a3a |
line wrap: on
line diff
--- 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<String, String>(); + LinkedHashMap<String, String> valueIcons = new LinkedHashMap<String, String>(); 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);