summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/Window.java
diff options
context:
space:
mode:
authorPetri Heinonen <petri@vaadin.com>2012-08-23 13:00:17 +0300
committerLeif Åstrand <leif@vaadin.com>2012-08-30 15:32:24 +0300
commitf32d6ab1db5c4732fa3fd13ff8714db6197cc3d4 (patch)
treef2a6d30671a3bbadf2beafc9f90d2c8fd54bf871 /server/src/com/vaadin/ui/Window.java
parent181904db6aa50a10383f098f022da7d4ed801738 (diff)
downloadvaadin-framework-f32d6ab1db5c4732fa3fd13ff8714db6197cc3d4.tar.gz
vaadin-framework-f32d6ab1db5c4732fa3fd13ff8714db6197cc3d4.zip
refak listeners com.vaadin.ui
Diffstat (limited to 'server/src/com/vaadin/ui/Window.java')
-rw-r--r--server/src/com/vaadin/ui/Window.java87
1 files changed, 79 insertions, 8 deletions
diff --git a/server/src/com/vaadin/ui/Window.java b/server/src/com/vaadin/ui/Window.java
index 388c003a52..aaf0fbc492 100644
--- a/server/src/com/vaadin/ui/Window.java
+++ b/server/src/com/vaadin/ui/Window.java
@@ -362,11 +362,20 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* @param listener
* the CloseListener to add.
*/
- public void addListener(CloseListener listener) {
+ public void addCloseListener(CloseListener listener) {
addListener(CloseEvent.class, listener, WINDOW_CLOSE_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addCloseListener(CloseListener)}
+ **/
+ @Deprecated
+ public void addListener(CloseListener listener) {
+ addCloseListener(listener);
+ }
+
+ /**
* Removes the CloseListener from the window.
*
* <p>
@@ -376,10 +385,19 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
* @param listener
* the CloseListener to remove.
*/
- public void removeListener(CloseListener listener) {
+ public void removeCloseListener(CloseListener listener) {
removeListener(CloseEvent.class, listener, WINDOW_CLOSE_METHOD);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeCloseListener(CloseListener)}
+ **/
+ @Deprecated
+ public void removeListener(CloseListener listener) {
+ removeCloseListener(listener);
+ }
+
protected void fireClose() {
fireEvent(new Window.CloseEvent(this));
}
@@ -438,20 +456,38 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
*
* @param listener
*/
- public void addListener(ResizeListener listener) {
+ public void addResizeListener(ResizeListener listener) {
addListener(ResizeEvent.class, listener, WINDOW_RESIZE_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addResizeListener(ResizeListener)}
+ **/
+ @Deprecated
+ public void addListener(ResizeListener listener) {
+ addResizeListener(listener);
+ }
+
+ /**
* Remove a resize listener.
*
* @param listener
*/
- public void removeListener(ResizeListener listener) {
+ public void removeResizeListener(ResizeListener listener) {
removeListener(ResizeEvent.class, listener);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeResizeListener(ResizeListener)}
+ **/
+ @Deprecated
+ public void removeListener(ResizeListener listener) {
+ removeResizeListener(listener);
+ }
+
+ /**
* Fire the resize event.
*/
protected void fireResize() {
@@ -748,17 +784,35 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
*/
@Override
- public void addListener(FocusListener listener) {
+ public void addFocusListener(FocusListener listener) {
addListener(FocusEvent.EVENT_ID, FocusEvent.class, listener,
FocusListener.focusMethod);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addFocusListener(FocusListener)}
+ **/
+ @Deprecated
+ public void addListener(FocusListener listener) {
+ addFocusListener(listener);
+ }
+
@Override
- public void removeListener(FocusListener listener) {
+ public void removeFocusListener(FocusListener listener) {
removeListener(FocusEvent.EVENT_ID, FocusEvent.class, listener);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeFocusListener(FocusListener)}
+ **/
+ @Deprecated
+ public void removeListener(FocusListener listener) {
+ removeFocusListener(listener);
+ }
+
+ /**
* Note, that focus/blur listeners in Window class are only supported by sub
* windows. Also note that Window is not considered focused if its contained
* component currently has focus.
@@ -767,17 +821,34 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier,
*/
@Override
- public void addListener(BlurListener listener) {
+ public void addBlurListener(BlurListener listener) {
addListener(BlurEvent.EVENT_ID, BlurEvent.class, listener,
BlurListener.blurMethod);
}
+ /**
+ * @deprecated Since 7.0, replaced by {@link #addBlurListener(BlurListener)}
+ **/
+ @Deprecated
+ public void addListener(BlurListener listener) {
+ addBlurListener(listener);
+ }
+
@Override
- public void removeListener(BlurListener listener) {
+ public void removeBlurListener(BlurListener listener) {
removeListener(BlurEvent.EVENT_ID, BlurEvent.class, listener);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeBlurListener(BlurListener)}
+ **/
+ @Deprecated
+ public void removeListener(BlurListener listener) {
+ removeBlurListener(listener);
+ }
+
+ /**
* {@inheritDoc}
*
* If the window is a sub-window focusing will cause the sub-window to be