Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/map/DrawControl.java @ 882:d3b4010d2c89
I293: Set the style of digitized features in the map.
flys-client/trunk@2713 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 13 Sep 2011 07:18:14 +0000 |
parents | 22dc88b17253 |
children | 981dde77b49f |
comparison
equal
deleted
inserted
replaced
881:4af1ee86b0b1 | 882:d3b4010d2c89 |
---|---|
37 public static final String BARRIER_PIPE2 = "pipe2"; | 37 public static final String BARRIER_PIPE2 = "pipe2"; |
38 public static final String BARRIER_DITCH = "ditch"; | 38 public static final String BARRIER_DITCH = "ditch"; |
39 public static final String BARRIER_DAM = "dam"; | 39 public static final String BARRIER_DAM = "dam"; |
40 public static final String BARRIER_RINGDIKE = "ring_dike"; | 40 public static final String BARRIER_RINGDIKE = "ring_dike"; |
41 | 41 |
42 public static final String BARRIER_PIPE1_VALUE = "Rohr 1"; | |
43 public static final String BARRIER_PIPE2_VALUE = "Rohr 2"; | |
44 public static final String BARRIER_DITCH_VALUE = "Graben"; | |
45 public static final String BARRIER_DAM_VALUE = "Damm"; | |
46 public static final String BARRIER_RINGDIKE_VALUE = "Ringdeich"; | |
47 | |
42 public static final String FIELD_BARRIER_TYPE = "field_barrier_type"; | 48 public static final String FIELD_BARRIER_TYPE = "field_barrier_type"; |
43 | 49 |
44 | 50 |
45 protected FLYSConstants MSG = GWT.create(FLYSConstants.class); | 51 protected FLYSConstants MSG = GWT.create(FLYSConstants.class); |
46 | 52 |
137 String type = attrs.getAttributeAsString("typ"); | 143 String type = attrs.getAttributeAsString("typ"); |
138 | 144 |
139 if (type == null || type.length() == 0) { | 145 if (type == null || type.length() == 0) { |
140 type = getSelectedType(); | 146 type = getSelectedType(); |
141 | 147 |
148 feature.setStyle(FloodMap.getStyle(type)); | |
149 | |
142 if (type.equals(BARRIER_PIPE1)) { | 150 if (type.equals(BARRIER_PIPE1)) { |
143 attrs.setAttribute("typ", "Rohr 1"); | 151 attrs.setAttribute("typ", BARRIER_PIPE1_VALUE); |
144 } | 152 } |
145 else if (type.equals(BARRIER_PIPE2)) { | 153 else if (type.equals(BARRIER_PIPE2)) { |
146 attrs.setAttribute("typ", "Rohr 2"); | 154 attrs.setAttribute("typ", BARRIER_PIPE2_VALUE); |
147 } | 155 } |
148 else if (type.equals(BARRIER_DAM)) { | 156 else if (type.equals(BARRIER_DAM)) { |
149 attrs.setAttribute("typ", "Damm"); | 157 attrs.setAttribute("typ", BARRIER_DAM_VALUE); |
150 } | 158 } |
151 else if (type.equals(BARRIER_DITCH)) { | 159 else if (type.equals(BARRIER_DITCH)) { |
152 attrs.setAttribute("typ", "Graben"); | 160 attrs.setAttribute("typ", BARRIER_DITCH_VALUE); |
153 } | 161 } |
154 else if (type.equals(BARRIER_RINGDIKE)) { | 162 else if (type.equals(BARRIER_RINGDIKE)) { |
155 attrs.setAttribute("typ", "Ringdeich"); | 163 attrs.setAttribute("typ", BARRIER_RINGDIKE_VALUE); |
156 } | 164 } |
165 | |
166 layer.redraw(); | |
157 } | 167 } |
158 } | 168 } |
159 | 169 |
160 | 170 |
161 protected void removeControl() { | 171 protected void removeControl() { |