Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/MultipleLocationPanel.java @ 1617:f13a7c126f24
Allow selection of multiple locations with mouse in MultipleLocationPanel.
flys-client/trunk@3986 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 09 Feb 2012 09:52:37 +0000 |
parents | 07c38d054f91 |
children | 95b821d63db3 |
comparison
equal
deleted
inserted
replaced
1616:ff8312688cd5 | 1617:f13a7c126f24 |
---|---|
23 import de.intevation.flys.client.shared.model.ArtifactDescription; | 23 import de.intevation.flys.client.shared.model.ArtifactDescription; |
24 import de.intevation.flys.client.shared.model.Data; | 24 import de.intevation.flys.client.shared.model.Data; |
25 import de.intevation.flys.client.shared.model.DataItem; | 25 import de.intevation.flys.client.shared.model.DataItem; |
26 import de.intevation.flys.client.shared.model.DataList; | 26 import de.intevation.flys.client.shared.model.DataList; |
27 import de.intevation.flys.client.shared.model.DistanceInfoObject; | 27 import de.intevation.flys.client.shared.model.DistanceInfoObject; |
28 import de.intevation.flys.client.shared.DoubleUtils; | |
28 import de.intevation.flys.client.shared.model.RangeData; | 29 import de.intevation.flys.client.shared.model.RangeData; |
29 | 30 |
30 import de.intevation.flys.client.client.services.DistanceInfoService; | 31 import de.intevation.flys.client.client.services.DistanceInfoService; |
31 import de.intevation.flys.client.client.services.DistanceInfoServiceAsync; | 32 import de.intevation.flys.client.client.services.DistanceInfoServiceAsync; |
32 import de.intevation.flys.client.client.Config; | 33 import de.intevation.flys.client.client.Config; |
297 * Callback when an item from the input helper was clicked. | 298 * Callback when an item from the input helper was clicked. |
298 * Set the respective km-value in the location value field. | 299 * Set the respective km-value in the location value field. |
299 * @param e event passed. | 300 * @param e event passed. |
300 */ | 301 */ |
301 public void onRecordClick (RecordClickEvent e) { | 302 public void onRecordClick (RecordClickEvent e) { |
302 Record record = e.getRecord(); | 303 Record record = e.getRecord(); |
303 double[] selected = new double[1]; | 304 double[] old = getLocationValues(); |
305 double[] selected = DoubleUtils.copyOf(old, old.length + 1); | |
304 try { | 306 try { |
305 selected[0] = | 307 selected[old.length] = |
306 Double.parseDouble(record.getAttribute("from")); | 308 Double.parseDouble(record.getAttribute("from")); |
307 } | 309 } |
308 catch(NumberFormatException nfe) { | 310 catch(NumberFormatException nfe) { |
309 // Is there anything else to do here? | 311 // Is there anything else to do here? |
310 } | 312 } |