Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
3535:75a3a41a6e51 | 3536:a1610c7e4a4e |
---|---|
314 | 314 |
315 String choiceAttribute = sp.getAttribute("choice"); | 315 String choiceAttribute = sp.getAttribute("choice"); |
316 | 316 |
317 if (choiceAttribute != null && choiceAttribute.equals("logo")) { | 317 if (choiceAttribute != null && choiceAttribute.equals("logo")) { |
318 SelectItem logoChooser = new SelectItem(); | 318 SelectItem logoChooser = new SelectItem(); |
319 logoChooser.setImageURLPrefix(GWT.getHostPageBaseURL() + "images/logo-"); | |
320 logoChooser.setValueIconHeight(50); | |
321 logoChooser.setValueIconWidth(100); | |
322 | |
319 LinkedHashMap valueMap = new LinkedHashMap<String, String>(); | 323 LinkedHashMap valueMap = new LinkedHashMap<String, String>(); |
324 LinkedHashMap<String, String> valueIcons = new LinkedHashMap<String, String>(); | |
320 valueMap.put("none", MSG.getString("none")); | 325 valueMap.put("none", MSG.getString("none")); |
321 valueMap.put("BfG", "Bfg"); | 326 /* |
327 If you want to add images, remember to change code in these places: | |
328 flys-artifacts: | |
329 XYChartGenerator.java | |
330 Timeseries*Generator.java and | |
331 in the flys-client projects Chart*Propert*Editor.java. | |
332 Also, these images have to be put in | |
333 flys-artifacts/src/main/resources/images/ | |
334 flys-client/src/main/webapp/images/ | |
335 */ | |
336 valueMap.put("BfG", "BfG"); | |
322 valueMap.put("Intevation", "Intevation"); | 337 valueMap.put("Intevation", "Intevation"); |
338 valueIcons.put("BfG", "bfg.gif"); | |
339 valueIcons.put("Intevation", "intevation.png"); | |
340 logoChooser.setValueIcons(valueIcons); | |
323 logoChooser.setValueMap(valueMap); | 341 logoChooser.setValueMap(valueMap); |
324 logoChooser.setTitleStyle("color:#000;"); | 342 logoChooser.setTitleStyle("color:#000;"); |
325 logoChooser.setTitleAlign(Alignment.LEFT); | 343 logoChooser.setTitleAlign(Alignment.LEFT); |
326 logoChooser.setTitle(MSG.getString(name)); | 344 logoChooser.setTitle(MSG.getString(name)); |
327 logoChooser.setTitleAlign(Alignment.LEFT); | 345 logoChooser.setTitleAlign(Alignment.LEFT); |