diff flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java @ 5195:d07abdb7ed7f

flys/issue1137: Allow value selection via inputhelpers in WQAdaptedPanel.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 08 Mar 2013 09:17:50 +0100
parents 5f70c73b11ed
children 6f23afa5323e
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java	Thu Mar 07 19:38:36 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java	Fri Mar 08 09:17:50 2013 +0100
@@ -9,6 +9,7 @@
 import com.smartgwt.client.widgets.form.fields.StaticTextItem;
 import com.smartgwt.client.widgets.form.fields.TextItem;
 import com.smartgwt.client.widgets.form.fields.events.BlurHandler;
+import com.smartgwt.client.widgets.form.fields.events.FocusHandler;
 
 import de.intevation.flys.client.client.FLYSConstants;
 
@@ -33,7 +34,7 @@
         double[] values,
         BlurHandler handler)
     {
-        this(title, values, handler, TitleOrientation.RIGHT);
+        this(title, values, handler, null, TitleOrientation.RIGHT);
     }
 
 
@@ -44,12 +45,14 @@
      * @param name The name of the TextItem.
      * @param title The title of the TextItem.
      * @param values The double values that should be displayed initially.
-     * @param handler The BlurHandler that is used to valide the input.
+     * @param blurHandler The BlurHandler that is used to valide the input.
+     * @param focusHandler The FocueHandler that is used to valide the input.
      */
     public DoubleArrayPanel(
         String title,
         double[] values,
-        BlurHandler handler,
+        BlurHandler blurHandler,
+        FocusHandler focusHandler,
         TitleOrientation titleOrientation)
     {
         this.title = title;
@@ -60,7 +63,8 @@
         sti.setShowTitle(false);
         sti.setValue(title);
 
-        ti.addBlurHandler(handler);
+        ti.addBlurHandler(blurHandler);
+        ti.addFocusHandler(focusHandler);
 
         if (titleOrientation == TitleOrientation.RIGHT) {
             setFields(ti, sti);

http://dive4elements.wald.intevation.org