changeset 2927:f978058dc835

Nicen Manual WSP editor. flys-client/trunk@4825 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 28 Jun 2012 14:50:05 +0000 (2012-06-28)
parents 59491a730461
children f0c7c52203c0
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ManualWSPEditor.java
diffstat 4 files changed, 58 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Thu Jun 28 14:34:54 2012 +0000
+++ b/flys-client/ChangeLog	Thu Jun 28 14:50:05 2012 +0000
@@ -1,3 +1,43 @@
+2012-06-28	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	Improved manual line editor.
+
+	* src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java:
+	  Fix i18n key for buttons tooltip.
+
+	* src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties:
+	  Fix translation.
+
+	* src/main/java/de/intevation/flys/client/client/ui/chart/ManualWSPEditor.java:
+	  Label the input fields, nicen dialog dimensions.
+
+2012-06-28	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java:
+	  Use different i18n key for button.
+	
+	* src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants.java: Added
+	  new i18n strings used for the manual WSP editor button.
+
+2012-06-27	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	Added basic GUI to register manual lines in cross section.
+
+	* src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java:
+	  Add Button to register Manual WSPs.
+
+	* src/main/java/de/intevation/flys/client/client/ui/chart/ManualWSPEditor.java:
+	  New. Basic manual WSP Editor.
+	
+	* src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSConstants.java: Added
+	  new i18n strings used for the manual WSP editor.
+
 2012-06-27	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/chart/ManualPointsEditor.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Thu Jun 28 14:34:54 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Thu Jun 28 14:50:05 2012 +0000
@@ -468,8 +468,8 @@
 standby = Erstelle Parameterisierung ... bitte warten.
 points = Punktthema
 editpoints = Eintr\u00e4ge editieren
-addWSP = WSP Thema
-addWSPButton = Neues WSP Thema anlegen
+addWSP = Neues WSP Thema anlegen
+addWSPButton = WSP Thema
 selection = Selektion
 
 # Reference Curves
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java	Thu Jun 28 14:34:54 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java	Thu Jun 28 14:50:05 2012 +0000
@@ -78,7 +78,7 @@
 
         if (this.chartTab.getMode().getName().equals("cross_section")) {
             addWSP = new Button(MSG.addWSPButton());
-            addWSP.setTooltip(MSG.addPointsTooltip());
+            addWSP.setTooltip(MSG.addWSPTooltip());
             final ChartOutputTab finalChartTab = chartTab;
             addWSP.addClickHandler(new ClickHandler() {
                 public void onClick(ClickEvent ce) {
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ManualWSPEditor.java	Thu Jun 28 14:34:54 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ManualWSPEditor.java	Thu Jun 28 14:50:05 2012 +0000
@@ -137,7 +137,7 @@
      * Initialize the editor window and its components.
      */
     protected void init() {
-        setTitle(MSG.addpoints());
+        setTitle(MSG.addWSP());
         setCanDragReposition(true);
         setCanDragResize(true);
 
@@ -170,18 +170,6 @@
         buttons.setAlign(Alignment.CENTER);
         buttons.setHeight(30);
 
-        DynamicForm form = new DynamicForm();
-        valueInputPanel = new TextItem();
-        valueInputPanel.setTitle("wsp");
-        valueInputPanel.setShowTitle(false);
-        nameInputPanel = new TextItem();
-        nameInputPanel.setTitle("name");
-        nameInputPanel.setShowTitle(false);
-        form.setFields(valueInputPanel, nameInputPanel);
-
-        VLayout layout = new VLayout();
-        layout.addMember(form);
-
         // Use X and Y as default fallback.
         String yAxis = "Y";
 
@@ -193,7 +181,7 @@
                 PropertyGroup pg = (PropertyGroup)p;
                 StringProperty id =
                     (StringProperty)pg.getPropertyByName("id");
-                if (yAxis.equals("Y")) {
+                if (id.getValue().equals("W")) {
                     StringProperty name =
                         (StringProperty)pg.getPropertyByName("label");
                     yAxis = name.getValue();
@@ -201,6 +189,17 @@
             }
         }
 
+        DynamicForm form = new DynamicForm();
+        valueInputPanel = new TextItem();
+        valueInputPanel.setTitle(yAxis);
+        valueInputPanel.setShowTitle(true);
+        nameInputPanel = new TextItem();
+        nameInputPanel.setTitle(MSG.pointname());
+        nameInputPanel.setShowTitle(true);
+        form.setFields(valueInputPanel, nameInputPanel);
+
+        VLayout layout = new VLayout();
+        layout.addMember(form);
 
         // Find the artifacts uuid.
         // TODO this has been called already, why call it again?
@@ -219,8 +218,8 @@
         addItem(layout);
 
         addItem(buttons);
-        setWidth(380);
-        setHeight(470);
+        setWidth(360);
+        setHeight(120);
         centerInPage();
     }
 

http://dive4elements.wald.intevation.org