Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/SingleLocationPanel.java @ 4221:480de0dbca8e
Extended location input helper.
The locationpicker has now an attribute whether the input is distance or
location to display one or two clickable columns.
Replaced the record click handler with cell click handler.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 23 Oct 2012 13:17:20 +0200 |
parents | 03de5c424f95 |
children |
comparison
equal
deleted
inserted
replaced
4220:a30647abf009 | 4221:480de0dbca8e |
---|---|
1 package de.intevation.flys.client.client.ui; | 1 package de.intevation.flys.client.client.ui; |
2 | 2 |
3 import com.google.gwt.i18n.client.NumberFormat; | 3 import com.google.gwt.i18n.client.NumberFormat; |
4 | 4 |
5 import com.smartgwt.client.data.Record; | 5 import com.smartgwt.client.data.Record; |
6 import com.smartgwt.client.widgets.grid.events.RecordClickEvent; | 6 |
7 import com.smartgwt.client.widgets.grid.events.CellClickEvent; | |
7 | 8 |
8 import de.intevation.flys.client.shared.model.Data; | 9 import de.intevation.flys.client.shared.model.Data; |
9 | 10 |
10 import java.util.ArrayList; | 11 import java.util.ArrayList; |
11 import java.util.List; | 12 import java.util.List; |
103 * Callback when an item from the input helper was clicked. | 104 * Callback when an item from the input helper was clicked. |
104 * Set the respective km-value in the location value field. | 105 * Set the respective km-value in the location value field. |
105 * @param e event passed. | 106 * @param e event passed. |
106 */ | 107 */ |
107 @Override | 108 @Override |
108 public void onRecordClick (RecordClickEvent e) { | 109 public void onCellClick (CellClickEvent e) { |
109 Record record = e.getRecord(); | 110 Record record = e.getRecord(); |
110 double[] selected = new double[1]; | 111 double[] selected = new double[1]; |
111 try { | 112 try { |
112 selected[0] = | 113 selected[0] = |
113 Double.parseDouble(record.getAttribute("from")); | 114 Double.parseDouble(record.getAttribute("from")); |