[Dive4elements-commits] [PATCH 5 of 8] Pass the FLYS instance to the InfoPanel class

Wald Commits scm-commit at wald.intevation.org
Tue Jun 4 18:45:37 CEST 2013


# HG changeset patch
# User Bernhard Herzog <bh at intevation.de>
# Date 1370360315 -7200
# Node ID 9b521dfb8920c350c17714e3992bc4dd9e8dce50
# Parent  7aadc0e2e3fa9def9613983aad6b751f4c80bf8c
Pass the FLYS instance to the InfoPanel class.
It will be needed for the SSO wiki links.
Part of flys/issue1265

diff -r 7aadc0e2e3fa -r 9b521dfb8920 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugePanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugePanel.java	Tue Jun 04 17:35:21 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugePanel.java	Tue Jun 04 17:38:35 2013 +0200
@@ -29,7 +29,7 @@
      * @param flys The FLYS object
      */
     public GaugePanel(FLYS flys) {
-        super(new GaugeListGrid(flys));
+        super(flys, new GaugeListGrid(flys));
     }
 
 
diff -r 7aadc0e2e3fa -r 9b521dfb8920 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/InfoPanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/InfoPanel.java	Tue Jun 04 17:35:21 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/InfoPanel.java	Tue Jun 04 17:38:35 2013 +0200
@@ -14,6 +14,7 @@
 import com.smartgwt.client.widgets.Canvas;
 import com.smartgwt.client.widgets.layout.SectionStackSection;
 import com.smartgwt.client.widgets.layout.VLayout;
+import org.dive4elements.river.client.client.FLYS;
 import org.dive4elements.river.client.client.FLYSConstants;
 import org.dive4elements.river.client.client.services.RiverInfoService;
 import org.dive4elements.river.client.client.services.RiverInfoServiceAsync;
@@ -26,6 +27,9 @@
  */
 public abstract class InfoPanel extends VLayout {
 
+    /** The instance of FLYS */
+    protected FLYS flys;
+
     /** SectionStackSection where this InfoPanel belongs in*/
     protected SectionStackSection section;
 
@@ -44,7 +48,7 @@
 
     public final static String SECTION_ID = "InfoPanelSection";
 
-    public InfoPanel(InfoListGrid listgrid) {
+    public InfoPanel(FLYS flys, InfoListGrid listgrid) {
         SectionStackSection section = new SectionStackSection();
         section.setExpanded(false);
         section.setTitle(getSectionTitle());
@@ -54,6 +58,8 @@
         setOverflow(Overflow.HIDDEN);
         setStyleName("infopanel");
 
+        this.flys = flys;
+
         section.setHidden(true);
         section.setItems(this);
         this.section = section;
diff -r 7aadc0e2e3fa -r 9b521dfb8920 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationPanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationPanel.java	Tue Jun 04 17:35:21 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationPanel.java	Tue Jun 04 17:38:35 2013 +0200
@@ -27,7 +27,7 @@
      * @param flys The FLYS object
      */
     public MeasurementStationPanel(FLYS flys) {
-        super(new MeasurementStationListGrid(flys));
+        super(flys, new MeasurementStationListGrid(flys));
     }
 
     /**


More information about the Dive4elements-commits mailing list