Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeListGrid.java @ 4960:a3a59055ed5e
Add click handler to create an artifact for Abflusstafel-/kurve from a pegel cell
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Mon, 04 Feb 2013 13:48:31 +0100 |
parents | 2b7886ba7bb2 |
children | 27b4d5d20dc8 |
comparison
equal
deleted
inserted
replaced
4959:2b7886ba7bb2 | 4960:a3a59055ed5e |
---|---|
13 import com.smartgwt.client.widgets.Canvas; | 13 import com.smartgwt.client.widgets.Canvas; |
14 import com.smartgwt.client.widgets.Label; | 14 import com.smartgwt.client.widgets.Label; |
15 import com.smartgwt.client.widgets.WidgetCanvas; | 15 import com.smartgwt.client.widgets.WidgetCanvas; |
16 import com.smartgwt.client.widgets.grid.ListGridField; | 16 import com.smartgwt.client.widgets.grid.ListGridField; |
17 import com.smartgwt.client.widgets.grid.ListGridRecord; | 17 import com.smartgwt.client.widgets.grid.ListGridRecord; |
18 import com.smartgwt.client.widgets.grid.events.RecordClickEvent; | |
19 import com.smartgwt.client.widgets.grid.events.RecordClickHandler; | |
18 import com.smartgwt.client.widgets.layout.HLayout; | 20 import com.smartgwt.client.widgets.layout.HLayout; |
19 import com.smartgwt.client.widgets.layout.VLayout; | 21 import com.smartgwt.client.widgets.layout.VLayout; |
20 | 22 |
21 import de.intevation.flys.client.client.FLYS; | 23 import de.intevation.flys.client.client.FLYS; |
22 import de.intevation.flys.client.shared.model.Data; | 24 import de.intevation.flys.client.shared.model.Data; |
27 | 29 |
28 | 30 |
29 /** | 31 /** |
30 * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a> | 32 * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a> |
31 */ | 33 */ |
32 public class GaugeListGrid extends InfoListGrid { | 34 public class GaugeListGrid extends InfoListGrid implements RecordClickHandler { |
33 | 35 |
34 public GaugeListGrid(FLYS flys) { | 36 public GaugeListGrid(FLYS flys) { |
35 super(flys); | 37 super(flys); |
36 ListGridField nfield = new ListGridField("name", "Pegel"); | 38 ListGridField nfield = new ListGridField("name", "Pegel"); |
37 ListGridField sfield = new ListGridField("kmstart", "Start [km]", 60); | 39 ListGridField sfield = new ListGridField("kmstart", "Start [km]", 60); |
424 @Override | 426 @Override |
425 protected Canvas getExpandPanel(ListGridRecord record) { | 427 protected Canvas getExpandPanel(ListGridRecord record) { |
426 GaugeRecord item = (GaugeRecord)record; | 428 GaugeRecord item = (GaugeRecord)record; |
427 return new WidgetCanvas(new GaugeInfoPanel(item)); | 429 return new WidgetCanvas(new GaugeInfoPanel(item)); |
428 } | 430 } |
431 | |
432 @Override | |
433 public void onRecordClick(RecordClickEvent event) { | |
434 GaugeRecord gauge = (GaugeRecord)event.getRecord(); | |
435 flys.newGaugeDischargeCurve(gauge.getRiverName(), | |
436 gauge.getOfficialNumber()); | |
437 } | |
429 } | 438 } |