diff flys-client/src/main/java/de/intevation/flys/client/client/ui/map/DrawControl.java @ 1311:981dde77b49f

#288 Added icons to the barriers combobox for digitizing features. flys-client/trunk@2946 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 12 Oct 2011 10:22:46 +0000
parents d3b4010d2c89
children cf0f906921de
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/DrawControl.java	Wed Oct 12 09:34:38 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/DrawControl.java	Wed Oct 12 10:22:46 2011 +0000
@@ -96,7 +96,7 @@
         });
 
         form = new DynamicForm();
-        form.setWidth(75);
+        form.setWidth(100);
         form.setTitlePrefix("");
         form.setTitleSuffix("");
 
@@ -107,10 +107,20 @@
         map.put(BARRIER_DAM, MSG.getString(BARRIER_DAM));
         map.put(BARRIER_RINGDIKE, MSG.getString(BARRIER_RINGDIKE));
 
+        LinkedHashMap<String, String> ics = new LinkedHashMap<String, String>();
+        ics.put(BARRIER_PIPE1, BARRIER_PIPE1);
+        ics.put(BARRIER_PIPE2, BARRIER_PIPE2);
+        ics.put(BARRIER_DITCH, BARRIER_DITCH);
+        ics.put(BARRIER_DAM, BARRIER_DAM);
+        ics.put(BARRIER_RINGDIKE, BARRIER_RINGDIKE);
+
         SelectItem box = new SelectItem(FIELD_BARRIER_TYPE);
         box.setTitle("");
-        box.setWidth(75);
+        box.setWidth(100);
         box.setValueMap(map);
+        box.setImageURLSuffix(".png");
+        box.setValueIcons(ics);
+
         box.addChangedHandler(new ChangedHandler() {
             public void onChanged(ChangedEvent e) {
                 setSelectedControl();

http://dive4elements.wald.intevation.org