Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/MultipleLocationPanel.java @ 2898:242b5c230707
Added UI for S-Q-relation parameters in minfo module.
flys-client/trunk@4636 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Mon, 11 Jun 2012 12:33:22 +0000 |
parents | 95b821d63db3 |
children | 51ed89b754ae |
comparison
equal
deleted
inserted
replaced
2897:133820d1e6bf | 2898:242b5c230707 |
---|---|
269 ArtifactDescription adescr = artifact.getArtifactDescription(); | 269 ArtifactDescription adescr = artifact.getArtifactDescription(); |
270 DataList[] data = adescr.getOldData(); | 270 DataList[] data = adescr.getOldData(); |
271 | 271 |
272 // Try to find a "river" data item to set the source for the | 272 // Try to find a "river" data item to set the source for the |
273 // list grid. | 273 // list grid. |
274 String dataFilter = "locations"; | |
274 if (data != null && data.length > 0) { | 275 if (data != null && data.length > 0) { |
275 for (int i = 0; i < data.length; i++) { | 276 for (int i = 0; i < data.length; i++) { |
276 DataList dl = data[i]; | 277 DataList dl = data[i]; |
278 if (dl.getState().equals("state.minfo.river")) { | |
279 dataFilter = "measuringpoint"; | |
280 } | |
277 if (dl.getState().equals("state.winfo.river") || | 281 if (dl.getState().equals("state.winfo.river") || |
278 dl.getState().equals("state.chart.river")) { | 282 dl.getState().equals("state.chart.river") || |
283 dl.getState().equals("state.minfo.river")) { | |
279 for (int j = 0; j < dl.size(); j++) { | 284 for (int j = 0; j < dl.size(); j++) { |
280 Data d = dl.get(j); | 285 Data d = dl.get(j); |
281 DataItem[] di = d.getItems(); | 286 DataItem[] di = d.getItems(); |
282 if (di != null && di.length == 1) { | 287 if (di != null && di.length == 1) { |
283 river = d.getItems()[0].getStringValue(); | 288 river = d.getItems()[0].getStringValue(); |
287 } | 292 } |
288 } | 293 } |
289 } | 294 } |
290 | 295 |
291 picker.getLocationTable().setDataSource(new DistanceInfoDataSource( | 296 picker.getLocationTable().setDataSource(new DistanceInfoDataSource( |
292 url, river, "locations")); | 297 url, river, dataFilter)); |
293 } | 298 } |
294 | 299 |
295 | 300 |
296 // TODO allow multiple selections here or in LocationPanel | 301 // TODO allow multiple selections here or in LocationPanel |
297 /** | 302 /** |