diff flys-client/src/main/java/de/intevation/flys/client/client/ui/SelectProvider.java @ 49:d573ae975330

Some refactoring (imports, etc). flys-client/trunk@1497 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 17 Mar 2011 11:39:27 +0000
parents 7142386e86c2
children a2923d63f530
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/SelectProvider.java	Thu Mar 17 11:23:07 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/SelectProvider.java	Thu Mar 17 11:39:27 2011 +0000
@@ -1,8 +1,6 @@
 package de.intevation.flys.client.client.ui;
 
-import java.util.ArrayList;
 import java.util.LinkedHashMap;
-import java.util.List;
 
 import com.google.gwt.core.client.GWT;
 
@@ -10,8 +8,6 @@
 import com.smartgwt.client.widgets.Canvas;
 import com.smartgwt.client.widgets.IButton;
 import com.smartgwt.client.widgets.Label;
-import com.smartgwt.client.widgets.events.ClickEvent;
-import com.smartgwt.client.widgets.events.ClickHandler;
 import com.smartgwt.client.widgets.form.DynamicForm;
 import com.smartgwt.client.widgets.form.fields.ComboBoxItem;
 import com.smartgwt.client.widgets.layout.HLayout;
@@ -23,9 +19,6 @@
 import de.intevation.flys.client.shared.model.DefaultDataItem;
 
 import de.intevation.flys.client.client.FLYSMessages;
-import de.intevation.flys.client.client.event.HasStepForwardHandlers;
-import de.intevation.flys.client.client.event.StepForwardEvent;
-import de.intevation.flys.client.client.event.StepForwardHandler;
 
 
 /**
@@ -33,15 +26,12 @@
  *
  * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
  */
-public class SelectProvider implements UIProvider, HasStepForwardHandlers,
-                                       ClickHandler
+public class SelectProvider
+extends      AbstractUIProvider
 {
     /** The message class that provides i18n strings.*/
     protected FLYSMessages messages = GWT.create(FLYSMessages.class);
 
-    /** The StepForwardHandlers.*/
-    protected List<StepForwardHandler> forwardHandlers;
-
     /** The combobox.*/
     protected ComboBoxItem combobox;
 
@@ -50,40 +40,6 @@
 
 
     /**
-     * Creates a new UIProvider instance of this class.
-     */
-    public SelectProvider() {
-        forwardHandlers = new ArrayList<StepForwardHandler>();
-    }
-
-
-    public void addStepForwardHandler(StepForwardHandler handler) {
-        if (handler != null) {
-            forwardHandlers.add(handler);
-        }
-    }
-
-
-    /**
-     * This method is called after the user has clicked on the 'next' button to
-     * step to the next state.
-     *
-     * @param e The StepForwardEvent.
-     */
-    protected void fireStepForwardEvent(StepForwardEvent e) {
-        GWT.log("SelectProvider - fireStepForwardEvent() handlers: " + forwardHandlers.size());
-        for (StepForwardHandler handler: forwardHandlers) {
-            handler.onStepForward(e);
-        }
-    }
-
-    public void onClick(ClickEvent e) {
-        Data[] data = getData();
-
-        SelectProvider.this.fireStepForwardEvent(new StepForwardEvent(data));
-    }
-
-    /**
      * This method currently returns a
      * {@link com.smartgwt.client.widgets.form.DynamicForm} that contains all
      * data items in a combobox stored in <i>data</i>.

http://dive4elements.wald.intevation.org