changeset 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
files flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeListGrid.java
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeListGrid.java	Mon Feb 04 13:46:38 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeListGrid.java	Mon Feb 04 13:48:31 2013 +0100
@@ -15,6 +15,8 @@
 import com.smartgwt.client.widgets.WidgetCanvas;
 import com.smartgwt.client.widgets.grid.ListGridField;
 import com.smartgwt.client.widgets.grid.ListGridRecord;
+import com.smartgwt.client.widgets.grid.events.RecordClickEvent;
+import com.smartgwt.client.widgets.grid.events.RecordClickHandler;
 import com.smartgwt.client.widgets.layout.HLayout;
 import com.smartgwt.client.widgets.layout.VLayout;
 
@@ -29,7 +31,7 @@
 /**
  * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a>
  */
-public class GaugeListGrid extends InfoListGrid {
+public class GaugeListGrid extends InfoListGrid implements RecordClickHandler {
 
     public GaugeListGrid(FLYS flys) {
         super(flys);
@@ -426,4 +428,11 @@
         GaugeRecord item = (GaugeRecord)record;
         return new WidgetCanvas(new GaugeInfoPanel(item));
     }
+
+    @Override
+    public void onRecordClick(RecordClickEvent event) {
+        GaugeRecord gauge = (GaugeRecord)event.getRecord();
+        flys.newGaugeDischargeCurve(gauge.getRiverName(),
+                gauge.getOfficialNumber());
+    }
 }

http://dive4elements.wald.intevation.org