Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java @ 1451:bc830e564b6d
Restore feature that was optimized away by last commit.
flys-client/trunk@3470 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 19 Dec 2011 16:34:41 +0000 |
parents | bb91cdf8407b |
children | 2f525f54e429 |
comparison
equal
deleted
inserted
replaced
1450:bb91cdf8407b | 1451:bc830e564b6d |
---|---|
1 package de.intevation.flys.client.client.ui; | 1 package de.intevation.flys.client.client.ui; |
2 | 2 |
3 import java.util.Arrays; | |
3 import java.util.LinkedHashMap; | 4 import java.util.LinkedHashMap; |
4 | 5 |
5 import com.google.gwt.core.client.GWT; | 6 import com.google.gwt.core.client.GWT; |
6 import com.google.gwt.user.client.rpc.AsyncCallback; | 7 import com.google.gwt.user.client.rpc.AsyncCallback; |
7 | 8 |
166 name.setShowDisabled(false); | 167 name.setShowDisabled(false); |
167 DynamicForm form = new DynamicForm(); | 168 DynamicForm form = new DynamicForm(); |
168 form.setFields(name); | 169 form.setFields(name); |
169 properties.addMember(form); | 170 properties.addMember(form); |
170 | 171 |
172 // Done via array to keep the order. | |
173 String[] sets = {"showlines", | |
174 "showpoints", | |
175 "linetype", | |
176 "linesize", | |
177 "linecolor", | |
178 "font", | |
179 "textstyle", | |
180 "textsize", | |
181 "textcolor", | |
182 "textorientation", | |
183 "backgroundcolor", | |
184 "showbackground"}; | |
185 | |
186 for (String settingName: sets) { | |
187 StyleSetting set = style.getSetting(settingName); | |
188 | |
189 if (set == null) { | |
190 continue; | |
191 } | |
192 | |
193 DynamicForm property = createPropertyUI( | |
194 set.getDisplayName(), | |
195 set.getName(), | |
196 set.getType(), | |
197 set.getDefaultValue()); | |
198 properties.addMember(property); | |
199 } | |
200 | |
201 // Add settings not in whitelist above. | |
171 for (StyleSetting set: style.getSettings()) { | 202 for (StyleSetting set: style.getSettings()) { |
172 | 203 |
173 if (set == null) { | 204 if (Arrays.asList(sets).contains(set.getName()) || set == null) { |
174 continue; | 205 continue; |
175 } | 206 } |
176 | 207 |
177 DynamicForm property = createPropertyUI( | 208 DynamicForm property = createPropertyUI( |
178 set.getDisplayName(), | 209 set.getDisplayName(), |