]> source.dussan.org Git - vaadin-framework.git/commitdiff
refak listeners com.vaadin.terminal
authorPetri Heinonen <petri@vaadin.com>
Thu, 23 Aug 2012 07:15:02 +0000 (10:15 +0300)
committerLeif Åstrand <leif@vaadin.com>
Thu, 30 Aug 2012 12:32:23 +0000 (15:32 +0300)
server/src/com/vaadin/server/Page.java

index 5c8d9a638e307d4820882258561e16d1cbea691d..5d626c2a01bb25ed4ce3a46696947dc9e1aec6df 100644 (file)
@@ -301,16 +301,35 @@ public class Page implements Serializable {
         }
     }
 
-    public void addListener(Page.FragmentChangedListener listener) {
+    public void addFragmentChangedListener(Page.FragmentChangedListener listener) {
         addListener(FragmentChangedEvent.class, listener,
                 FRAGMENT_CHANGED_METHOD);
     }
 
-    public void removeListener(Page.FragmentChangedListener listener) {
+    /**
+     * @deprecated Since 7.0, replaced by
+     *             {@link #addFragmentChangedListener(FragmentChangedListener)}
+     **/
+    @Deprecated
+    public void addListener(Page.FragmentChangedListener listener) {
+        addFragmentChangedListener(listener);
+    }
+
+    public void removeFragmentChangedListener(
+            Page.FragmentChangedListener listener) {
         removeListener(FragmentChangedEvent.class, listener,
                 FRAGMENT_CHANGED_METHOD);
     }
 
+    /**
+     * @deprecated Since 7.0, replaced by
+     *             {@link #removeFragmentChangedListener(FragmentChangedListener)}
+     **/
+    @Deprecated
+    public void removeListener(Page.FragmentChangedListener listener) {
+        removeFragmentChangedListener(listener);
+    }
+
     /**
      * Sets URI fragment. Optionally fires a {@link FragmentChangedEvent}
      * 
@@ -407,25 +426,45 @@ public class Page implements Serializable {
      * @see BrowserWindowResizeListener#browserWindowResized(BrowserWindowResizeEvent)
      * @see #setResizeLazy(boolean)
      */
-    public void addListener(BrowserWindowResizeListener resizeListener) {
+    public void addBrowserWindowResizeListener(
+            BrowserWindowResizeListener resizeListener) {
         addListener(BrowserWindowResizeEvent.class, resizeListener,
                 BROWSWER_RESIZE_METHOD);
     }
 
     /**
-     * Removes a {@link BrowserWindowResizeListener} from this uI. The
+     * @deprecated Since 7.0, replaced by
+     *             {@link #addBrowserWindowResizeListener(BrowserWindowResizeListener)}
+     **/
+    @Deprecated
+    public void addListener(BrowserWindowResizeListener resizeListener) {
+        addBrowserWindowResizeListener(resizeListener);
+    }
+
+    /**
+     * Removes a {@link BrowserWindowResizeListener} from this UI. The
      * listener will no longer be notified when the browser window is resized.
      * 
      * @param resizeListener
      *            the listener to remove
      */
-    public void removeListener(BrowserWindowResizeListener resizeListener) {
+    public void removeBrowserWindowResizeListener(
+            BrowserWindowResizeListener resizeListener) {
         removeListener(BrowserWindowResizeEvent.class, resizeListener,
                 BROWSWER_RESIZE_METHOD);
     }
 
     /**
-     * Gets the last known height of the browser window in which this uI
+     * @deprecated Since 7.0, replaced by
+     *             {@link #removeBrowserWindowResizeListener(BrowserWindowResizeListener)}
+     **/
+    @Deprecated
+    public void removeListener(BrowserWindowResizeListener resizeListener) {
+        removeBrowserWindowResizeListener(resizeListener);
+    }
+
+    /**
+     * Gets the last known height of the browser window in which this UI
      * resides.
      * 
      * @return the browser window height in pixels