changeset 243:11c5bcd349b1

Added a stub implementation of a WQ panel for discharge longitudinal section computations. flys-client/trunk@1823 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 04 May 2011 14:05:40 +0000
parents f9ca49e59fb6
children 1bc787eeb556
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties flys-client/src/main/java/de/intevation/flys/client/client/ui/UIProviderFactory.java flys-client/src/main/java/de/intevation/flys/client/client/ui/WQAdaptedInputPanel.java
diffstat 7 files changed, 107 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Wed May 04 13:02:00 2011 +0000
+++ b/flys-client/ChangeLog	Wed May 04 14:05:40 2011 +0000
@@ -1,3 +1,22 @@
+2011-05-04  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/WQAdaptedInputPanel.java:
+	  New. This UIProvider is used to enter W/Q values associated with a set
+	  of gauges.
+
+	  NOTE: This is currently just a stub implementation used for further
+	  development.
+
+	* src/main/java/de/intevation/flys/client/client/ui/UIProviderFactory.java:
+	  Initialize the WQAdaptedInputPanel if the uiprovider flag is set to
+	  "wq_panel_adapted".
+
+	* src/main/java/de/intevation/flys/client/client/FLYSConstants.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants.java: New
+	  i18n strings for the "discharge longitudinal section.
+
 2011-05-04  Raimund Renkert <rrenkert@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/SingleLocationPanel.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java	Wed May 04 13:02:00 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java	Wed May 04 14:05:40 2011 +0000
@@ -122,6 +122,8 @@
 
     String imageBack();
 
+    // OUTPUT TYPES
+
     String discharge_curve();
 
     String computed_discharge_curve();
@@ -132,6 +134,8 @@
 
     String waterlevel_export();
 
+    String discharge_longitudinal_section();
+
     // ERRORS
 
     String error_create_artifact();
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties	Wed May 04 13:02:00 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties	Wed May 04 14:05:40 2011 +0000
@@ -63,6 +63,7 @@
 longitudinal_section = Longitudinal Section Curve
 duration_curve = Duration Curve
 waterlevel_export = Waterlevel Export
+discharge_longitudinal_section = Discharge Longitudinal Section
 
 error_create_artifact = Error while creating new project.
 error_describe_artifact = Error while loading the parameterization.
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Wed May 04 13:02:00 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Wed May 04 14:05:40 2011 +0000
@@ -63,6 +63,7 @@
 longitudinal_section = L\u00e4ngsschnitt
 duration_curve = Dauerlinie
 waterlevel_export = Wasserstand/Wasserspiegellagen Export
+discharge_longitudinal_section = W bei ungleichwertigem Abflussl\u00e4ngsschnitt
 
 error_create_artifact = Fehler beim Erstellen eines neuen Projekts.
 error_describe_artifact = Fehler beim Laden der Parametrisierung.
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties	Wed May 04 13:02:00 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties	Wed May 04 14:05:40 2011 +0000
@@ -63,6 +63,7 @@
 longitudinal_section = Longitudinal Section Curve
 duration_curve = Duration Curve
 waterlevel_export = Waterlevel Export
+discharge_longitudinal_section = Discharge Longitudinal Section
 
 error_create_artifact = Error while creating new project.
 error_describe_artifact = Error while loading the parameterization.
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/UIProviderFactory.java	Wed May 04 13:02:00 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/UIProviderFactory.java	Wed May 04 14:05:40 2011 +0000
@@ -21,6 +21,9 @@
         else if (uiProvider.equals("wq_panel")) {
             return new WQInputPanel();
         }
+        else if (uiProvider.equals("wq_panel_adapted")) {
+            return new WQAdaptedInputPanel();
+        }
         else {
             return new SelectProvider();
         }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQAdaptedInputPanel.java	Wed May 04 14:05:40 2011 +0000
@@ -0,0 +1,78 @@
+package de.intevation.flys.client.client.ui;
+
+import com.google.gwt.core.client.GWT;
+
+import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.Label;
+import com.smartgwt.client.widgets.form.fields.events.BlurHandler;
+import com.smartgwt.client.widgets.form.fields.events.BlurEvent;
+import com.smartgwt.client.widgets.form.fields.events.ChangeHandler;
+import com.smartgwt.client.widgets.form.fields.events.ChangeEvent;
+import com.smartgwt.client.widgets.layout.VLayout;
+
+import de.intevation.flys.client.shared.model.Data;
+import de.intevation.flys.client.shared.model.DataItem;
+import de.intevation.flys.client.shared.model.DataList;
+import de.intevation.flys.client.shared.model.DefaultData;
+import de.intevation.flys.client.shared.model.DefaultDataItem;
+
+
+/**
+ * This UIProvider creates a widget to enter W or Q data for discharge
+ * longitudinal section computations.
+ *
+ * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
+ */
+public class WQAdaptedInputPanel
+extends      AbstractUIProvider
+implements   ChangeHandler, BlurHandler
+{
+    public WQAdaptedInputPanel() {
+    }
+
+
+    public Canvas create(DataList data) {
+        GWT.log("HELLO INGO");
+        Canvas submit = getNextButton();
+
+        VLayout layout = new VLayout();
+        layout.setMembersMargin(10);
+
+        layout.addMember(submit);
+
+        return layout;
+    }
+
+
+    public Canvas createOld(DataList dataList) {
+        // TODO IMPLEMENT ME
+        return new Label("Ich hab schon was eingegeben.");
+    }
+
+
+    public Data[] getData() {
+        DataItem item = new DefaultDataItem("wq_mode", "wq_mode", "bla");
+
+        Data mode = new DefaultData(
+            "wq_mode", null, null, new DataItem[] { item });
+
+        DataItem valueItem = new DefaultDataItem(
+            "wq_values", "wq_values",
+            "0.0;70.2;9.6");
+        Data values = new DefaultData(
+            "wq_values", null, null, new DataItem[] { valueItem });
+
+        return new Data[] { mode, values };
+    }
+
+
+    public void onChange(ChangeEvent event) {
+        // TODO IMPLEMENT ME
+    }
+
+
+    public void onBlur(BlurEvent event) {
+        // TODO IMPLEMENT ME
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org