[Dive4elements-commits] [PATCH 4 of 5] Add click handler to create an artifact for Abflusstafel-/kurve from a pegel cell

Wald Commits scm-commit at wald.intevation.org
Mon Feb 4 13:49:21 CET 2013


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1359982111 -3600
# Node ID a3a59055ed5e2e80c60f3674f584df35231f72e4
# Parent  2b7886ba7bb2097e3638c5deb893b4ddd21ea9be
Add click handler to create an artifact for Abflusstafel-/kurve from a pegel cell

diff -r 2b7886ba7bb2 -r a3a59055ed5e flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeListGrid.java
--- 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 at 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());
+    }
 }


More information about the Dive4elements-commits mailing list