Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterMatrix.java @ 8856:5e38e2924c07 3.2.x
Fix code style.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 18 Jan 2018 20:12:01 +0100 |
parents | 982382d9ea8b |
children | f575ff573cbb |
comparison
equal
deleted
inserted
replaced
8855:d7c005e12af0 | 8856:5e38e2924c07 |
---|---|
132 | 132 |
133 Column col = new Column(groupTitle); | 133 Column col = new Column(groupTitle); |
134 DataItem[] items = options.getItems(); | 134 DataItem[] items = options.getItems(); |
135 | 135 |
136 if (items == null) { | 136 if (items == null) { |
137 GWT.log("No items found in StringOptionsData '" + groupTitle + "'"); | 137 GWT.log("No items found in StringOptionsData '" |
138 + groupTitle + "'"); | |
138 return; | 139 return; |
139 } | 140 } |
140 | 141 |
141 for (DataItem item: items) { | 142 for (DataItem item: items) { |
142 String title = item.getLabel(); | 143 String title = item.getLabel(); |
158 | 159 |
159 Column col = new Column(groupTitle); | 160 Column col = new Column(groupTitle); |
160 DataItem[] items = options.getItems(); | 161 DataItem[] items = options.getItems(); |
161 | 162 |
162 if (items == null) { | 163 if (items == null) { |
163 GWT.log("No items found in StringOptionsData '" + groupTitle + "'"); | 164 GWT.log("No items found in StringOptionsData '" |
165 + groupTitle + "'"); | |
164 return; | 166 return; |
165 } | 167 } |
166 | 168 |
167 MultiDataItem mItem = (MultiDataItem)items[0]; | 169 MultiDataItem mItem = (MultiDataItem)items[0]; |
168 for (Map.Entry<String, String> entry: mItem.getValue().entrySet()) { | 170 for (Map.Entry<String, String> entry: mItem.getValue().entrySet()) { |
216 entry.getKey(), MESSAGE.getString(entry.getKey())); | 218 entry.getKey(), MESSAGE.getString(entry.getKey())); |
217 fields.add(attrField); | 219 fields.add(attrField); |
218 } | 220 } |
219 | 221 |
220 for (int i = 0, n = columnNames.size(); i < n; i++) { | 222 for (int i = 0, n = columnNames.size(); i < n; i++) { |
221 ListGridField field = new ListGridField(columnNames.get(i), MESSAGE.getString(columnNames.get(i))); | 223 ListGridField field = new ListGridField( |
224 columnNames.get(i), MESSAGE.getString(columnNames.get(i))); | |
222 field.setType(ListGridFieldType.BOOLEAN); | 225 field.setType(ListGridFieldType.BOOLEAN); |
223 field.setCanEdit(true); | 226 field.setCanEdit(true); |
224 fields.add(field); | 227 fields.add(field); |
225 selected.put(columnNames.get(i), new ArrayList<String>()); | 228 selected.put(columnNames.get(i), new ArrayList<String>()); |
226 } | 229 } |
227 | 230 |
228 ListGridField[] fieldsArray = fields.toArray(new ListGridField[fields.size()]); | 231 ListGridField[] fieldsArray = fields.toArray( |
232 new ListGridField[fields.size()]); | |
229 listGrid.setFields(fieldsArray); | 233 listGrid.setFields(fieldsArray); |
230 | 234 |
231 int nVals = valueNames.size(); | 235 int nVals = valueNames.size(); |
232 | 236 |
233 ArrayList<ListGridRecord> records = new ArrayList<ListGridRecord>(); | 237 ArrayList<ListGridRecord> records = new ArrayList<ListGridRecord>(); |
336 for (ListGridRecord record : records) { | 340 for (ListGridRecord record : records) { |
337 for (int i = 0, n = columnNames.size(); i < n; i++) { | 341 for (int i = 0, n = columnNames.size(); i < n; i++) { |
338 String columnName = columnNames.get(i); | 342 String columnName = columnNames.get(i); |
339 if (Boolean.valueOf(record.getAttribute(columnName)) == true) { | 343 if (Boolean.valueOf(record.getAttribute(columnName)) == true) { |
340 if (result.containsKey(columnName)) { | 344 if (result.containsKey(columnName)) { |
341 result.get(columnName).add(record.getAttribute(columnName + "-value")); | 345 result.get(columnName).add( |
346 record.getAttribute(columnName + "-value")); | |
342 } | 347 } |
343 else { | 348 else { |
344 List<String> items = new ArrayList<String>(); | 349 List<String> items = new ArrayList<String>(); |
345 items.add(record.getAttribute(columnName + "-value")); | 350 items.add(record.getAttribute(columnName + "-value")); |
346 result.put(columnName, items); | 351 result.put(columnName, items); |