aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/src/com/vaadin/ui/AbsoluteLayout.java21
-rw-r--r--server/src/com/vaadin/ui/AbstractComponentContainer.java44
-rw-r--r--server/src/com/vaadin/ui/AbstractField.java46
-rw-r--r--server/src/com/vaadin/ui/AbstractOrderedLayout.java22
-rw-r--r--server/src/com/vaadin/ui/AbstractSelect.java48
-rw-r--r--server/src/com/vaadin/ui/AbstractSplitPanel.java22
-rw-r--r--server/src/com/vaadin/ui/AbstractTextField.java65
-rw-r--r--server/src/com/vaadin/ui/Button.java64
-rw-r--r--server/src/com/vaadin/ui/CheckBox.java43
-rw-r--r--server/src/com/vaadin/ui/ComponentContainer.java28
-rw-r--r--server/src/com/vaadin/ui/CssLayout.java22
-rw-r--r--server/src/com/vaadin/ui/CustomField.java45
-rw-r--r--server/src/com/vaadin/ui/DateField.java43
-rw-r--r--server/src/com/vaadin/ui/Embedded.java22
-rw-r--r--server/src/com/vaadin/ui/GridLayout.java24
-rw-r--r--server/src/com/vaadin/ui/Label.java22
-rw-r--r--server/src/com/vaadin/ui/LoginForm.java22
-rw-r--r--server/src/com/vaadin/ui/OptionGroup.java43
-rw-r--r--server/src/com/vaadin/ui/Panel.java22
-rw-r--r--server/src/com/vaadin/ui/PopupView.java22
-rw-r--r--server/src/com/vaadin/ui/Select.java42
-rw-r--r--server/src/com/vaadin/ui/TabSheet.java65
-rw-r--r--server/src/com/vaadin/ui/Table.java110
-rw-r--r--server/src/com/vaadin/ui/Tree.java66
-rw-r--r--server/src/com/vaadin/ui/TreeTable.java44
-rw-r--r--server/src/com/vaadin/ui/UI.java40
-rw-r--r--server/src/com/vaadin/ui/Upload.java110
-rw-r--r--server/src/com/vaadin/ui/Window.java87
28 files changed, 1123 insertions, 131 deletions
diff --git a/server/src/com/vaadin/ui/AbsoluteLayout.java b/server/src/com/vaadin/ui/AbsoluteLayout.java
index 412a3390e4..794de49671 100644
--- a/server/src/com/vaadin/ui/AbsoluteLayout.java
+++ b/server/src/com/vaadin/ui/AbsoluteLayout.java
@@ -629,16 +629,33 @@ public class AbsoluteLayout extends AbstractLayout implements
}
@Override
- public void addListener(LayoutClickListener listener) {
+ public void addLayoutClickListener(LayoutClickListener listener) {
addListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
LayoutClickEvent.class, listener,
LayoutClickListener.clickMethod);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addLayoutClickListener(LayoutClickListener)}
+ **/
+ @Deprecated
+ public void addListener(LayoutClickListener listener) {
+ addLayoutClickListener(listener);
+ }
+
@Override
- public void removeListener(LayoutClickListener listener) {
+ public void removeLayoutClickListener(LayoutClickListener listener) {
removeListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
LayoutClickEvent.class, listener);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeLayoutClickListener(LayoutClickListener)}
+ **/
+ @Deprecated
+ public void removeListener(LayoutClickListener listener) {
+ removeLayoutClickListener(listener);
+ }
}
diff --git a/server/src/com/vaadin/ui/AbstractComponentContainer.java b/server/src/com/vaadin/ui/AbstractComponentContainer.java
index 8dd440828b..cf3bf1d2b9 100644
--- a/server/src/com/vaadin/ui/AbstractComponentContainer.java
+++ b/server/src/com/vaadin/ui/AbstractComponentContainer.java
@@ -106,33 +106,69 @@ public abstract class AbstractComponentContainer extends AbstractComponent
/* documented in interface */
@Override
- public void addListener(ComponentAttachListener listener) {
+ public void addComponentAttachListener(ComponentAttachListener listener) {
addListener(ComponentContainer.ComponentAttachEvent.class, listener,
COMPONENT_ATTACHED_METHOD);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addComponentAttachListener(com.vaadin.ui.ComponentContainer.ComponentAttachListener)}
+ **/
+ @Deprecated
+ public void addListener(ComponentAttachListener listener) {
+ addComponentAttachListener(listener);
+ }
+
/* documented in interface */
@Override
- public void addListener(ComponentDetachListener listener) {
+ public void addComponentDetachListener(ComponentDetachListener listener) {
addListener(ComponentContainer.ComponentDetachEvent.class, listener,
COMPONENT_DETACHED_METHOD);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addComponentDetachListener(com.vaadin.ui.ComponentContainer.ComponentDetachListener)}
+ **/
+ @Deprecated
+ public void addListener(ComponentDetachListener listener) {
+ addComponentDetachListener(listener);
+ }
+
/* documented in interface */
@Override
- public void removeListener(ComponentAttachListener listener) {
+ public void removeComponentAttachListener(ComponentAttachListener listener) {
removeListener(ComponentContainer.ComponentAttachEvent.class, listener,
COMPONENT_ATTACHED_METHOD);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeComponentAttachListener(com.vaadin.ui.ComponentContainer.ComponentAttachListener)}
+ **/
+ @Deprecated
+ public void removeListener(ComponentAttachListener listener) {
+ removeComponentAttachListener(listener);
+ }
+
/* documented in interface */
@Override
- public void removeListener(ComponentDetachListener listener) {
+ public void removeComponentDetachListener(ComponentDetachListener listener) {
removeListener(ComponentContainer.ComponentDetachEvent.class, listener,
COMPONENT_DETACHED_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeComponentDetachListener(com.vaadin.ui.ComponentContainer.ComponentDetachListener)}
+ **/
+ @Deprecated
+ public void removeListener(ComponentDetachListener listener) {
+ removeComponentDetachListener(listener);
+ }
+
+ /**
* Fires the component attached event. This should be called by the
* addComponent methods after the component have been added to this
* container.
diff --git a/server/src/com/vaadin/ui/AbstractField.java b/server/src/com/vaadin/ui/AbstractField.java
index eaedfa5809..b1d45ae590 100644
--- a/server/src/com/vaadin/ui/AbstractField.java
+++ b/server/src/com/vaadin/ui/AbstractField.java
@@ -1047,23 +1047,41 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* here, we use the default documentation from the implemented interface.
*/
@Override
- public void addListener(Property.ValueChangeListener listener) {
+ public void addValueChangeListener(Property.ValueChangeListener listener) {
addListener(AbstractField.ValueChangeEvent.class, listener,
VALUE_CHANGE_METHOD);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addValueChangeListener(com.vaadin.data.Property.ValueChangeListener)}
+ **/
+ @Deprecated
+ public void addListener(Property.ValueChangeListener listener) {
+ addValueChangeListener(listener);
+ }
+
/*
* Removes a value change listener from the field. Don't add a JavaDoc
* comment here, we use the default documentation from the implemented
* interface.
*/
@Override
- public void removeListener(Property.ValueChangeListener listener) {
+ public void removeValueChangeListener(Property.ValueChangeListener listener) {
removeListener(AbstractField.ValueChangeEvent.class, listener,
VALUE_CHANGE_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeValueChangeListener(com.vaadin.data.Property.ValueChangeListener)}
+ **/
+ @Deprecated
+ public void removeListener(Property.ValueChangeListener listener) {
+ removeValueChangeListener(listener);
+ }
+
+ /**
* Emits the value change event. The value contained in the field is
* validated before the event is created.
*/
@@ -1139,23 +1157,43 @@ public abstract class AbstractField<T> extends AbstractComponent implements
* implemented interface.
*/
@Override
- public void addListener(Property.ReadOnlyStatusChangeListener listener) {
+ public void addReadOnlyStatusChangeListener(
+ Property.ReadOnlyStatusChangeListener listener) {
addListener(Property.ReadOnlyStatusChangeEvent.class, listener,
READ_ONLY_STATUS_CHANGE_METHOD);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addReadOnlyStatusChangeListener(com.vaadin.data.Property.ReadOnlyStatusChangeListener)}
+ **/
+ @Deprecated
+ public void addListener(Property.ReadOnlyStatusChangeListener listener) {
+ addReadOnlyStatusChangeListener(listener);
+ }
+
/*
* Removes a read-only status change listener from the field. Don't add a
* JavaDoc comment here, we use the default documentation from the
* implemented interface.
*/
@Override
- public void removeListener(Property.ReadOnlyStatusChangeListener listener) {
+ public void removeReadOnlyStatusChangeListener(
+ Property.ReadOnlyStatusChangeListener listener) {
removeListener(Property.ReadOnlyStatusChangeEvent.class, listener,
READ_ONLY_STATUS_CHANGE_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeReadOnlyStatusChangeListener(com.vaadin.data.Property.ReadOnlyStatusChangeListener)}
+ **/
+ @Deprecated
+ public void removeListener(Property.ReadOnlyStatusChangeListener listener) {
+ removeReadOnlyStatusChangeListener(listener);
+ }
+
+ /**
* Emits the read-only status change event. The value contained in the field
* is validated before the event is created.
*/
diff --git a/server/src/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/com/vaadin/ui/AbstractOrderedLayout.java
index 53572097e0..184f7c40f4 100644
--- a/server/src/com/vaadin/ui/AbstractOrderedLayout.java
+++ b/server/src/com/vaadin/ui/AbstractOrderedLayout.java
@@ -339,19 +339,37 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements
}
@Override
- public void addListener(LayoutClickListener listener) {
+ public void addLayoutClickListener(LayoutClickListener listener) {
addListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
LayoutClickEvent.class, listener,
LayoutClickListener.clickMethod);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addLayoutClickListener(LayoutClickListener)}
+ **/
+ @Deprecated
+ public void addListener(LayoutClickListener listener) {
+ addLayoutClickListener(listener);
+ }
+
@Override
- public void removeListener(LayoutClickListener listener) {
+ public void removeLayoutClickListener(LayoutClickListener listener) {
removeListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
LayoutClickEvent.class, listener);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeLayoutClickListener(LayoutClickListener)}
+ **/
+ @Deprecated
+ public void removeListener(LayoutClickListener listener) {
+ removeLayoutClickListener(listener);
+ }
+
+ /**
* Returns the index of the given component.
*
* @param component
diff --git a/server/src/com/vaadin/ui/AbstractSelect.java b/server/src/com/vaadin/ui/AbstractSelect.java
index 677aeee50f..3dba5088df 100644
--- a/server/src/com/vaadin/ui/AbstractSelect.java
+++ b/server/src/com/vaadin/ui/AbstractSelect.java
@@ -1480,7 +1480,8 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
* @see com.vaadin.data.Container.PropertySetChangeNotifier#addListener(com.vaadin.data.Container.PropertySetChangeListener)
*/
@Override
- public void addListener(Container.PropertySetChangeListener listener) {
+ public void addPropertySetChangeListener(
+ Container.PropertySetChangeListener listener) {
if (propertySetEventListeners == null) {
propertySetEventListeners = new LinkedHashSet<Container.PropertySetChangeListener>();
}
@@ -1488,12 +1489,22 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addPropertySetChangeListener(com.vaadin.data.Container.PropertySetChangeListener)}
+ **/
+ @Deprecated
+ public void addListener(Container.PropertySetChangeListener listener) {
+ addPropertySetChangeListener(listener);
+ }
+
+ /**
* Removes a previously registered Property set change listener.
*
* @see com.vaadin.data.Container.PropertySetChangeNotifier#removeListener(com.vaadin.data.Container.PropertySetChangeListener)
*/
@Override
- public void removeListener(Container.PropertySetChangeListener listener) {
+ public void removePropertySetChangeListener(
+ Container.PropertySetChangeListener listener) {
if (propertySetEventListeners != null) {
propertySetEventListeners.remove(listener);
if (propertySetEventListeners.isEmpty()) {
@@ -1503,12 +1514,22 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removePropertySetChangeListener(com.vaadin.data.Container.PropertySetChangeListener)}
+ **/
+ @Deprecated
+ public void removeListener(Container.PropertySetChangeListener listener) {
+ removePropertySetChangeListener(listener);
+ }
+
+ /**
* Adds an Item set change listener for the object.
*
* @see com.vaadin.data.Container.ItemSetChangeNotifier#addListener(com.vaadin.data.Container.ItemSetChangeListener)
*/
@Override
- public void addListener(Container.ItemSetChangeListener listener) {
+ public void addItemSetChangeListener(
+ Container.ItemSetChangeListener listener) {
if (itemSetEventListeners == null) {
itemSetEventListeners = new LinkedHashSet<Container.ItemSetChangeListener>();
}
@@ -1516,12 +1537,22 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)}
+ **/
+ @Deprecated
+ public void addListener(Container.ItemSetChangeListener listener) {
+ addItemSetChangeListener(listener);
+ }
+
+ /**
* Removes the Item set change listener from the object.
*
* @see com.vaadin.data.Container.ItemSetChangeNotifier#removeListener(com.vaadin.data.Container.ItemSetChangeListener)
*/
@Override
- public void removeListener(Container.ItemSetChangeListener listener) {
+ public void removeItemSetChangeListener(
+ Container.ItemSetChangeListener listener) {
if (itemSetEventListeners != null) {
itemSetEventListeners.remove(listener);
if (itemSetEventListeners.isEmpty()) {
@@ -1530,6 +1561,15 @@ public abstract class AbstractSelect extends AbstractField<Object> implements
}
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener)}
+ **/
+ @Deprecated
+ public void removeListener(Container.ItemSetChangeListener listener) {
+ removeItemSetChangeListener(listener);
+ }
+
@Override
public Collection<?> getListeners(Class<?> eventType) {
if (Container.ItemSetChangeEvent.class.isAssignableFrom(eventType)) {
diff --git a/server/src/com/vaadin/ui/AbstractSplitPanel.java b/server/src/com/vaadin/ui/AbstractSplitPanel.java
index f9fea66276..f1452caacf 100644
--- a/server/src/com/vaadin/ui/AbstractSplitPanel.java
+++ b/server/src/com/vaadin/ui/AbstractSplitPanel.java
@@ -501,16 +501,34 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer {
}
- public void addListener(SplitterClickListener listener) {
+ public void addSplitterClickListener(SplitterClickListener listener) {
addListener(EventId.CLICK_EVENT_IDENTIFIER, SplitterClickEvent.class,
listener, SplitterClickListener.clickMethod);
}
- public void removeListener(SplitterClickListener listener) {
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addSplitterClickListener(SplitterClickListener)}
+ **/
+ @Deprecated
+ public void addListener(SplitterClickListener listener) {
+ addSplitterClickListener(listener);
+ }
+
+ public void removeSplitterClickListener(SplitterClickListener listener) {
removeListener(EventId.CLICK_EVENT_IDENTIFIER,
SplitterClickEvent.class, listener);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeSplitterClickListener(SplitterClickListener)}
+ **/
+ @Deprecated
+ public void removeListener(SplitterClickListener listener) {
+ removeSplitterClickListener(listener);
+ }
+
@Override
protected AbstractSplitPanelState getState() {
return (AbstractSplitPanelState) super.getState();
diff --git a/server/src/com/vaadin/ui/AbstractTextField.java b/server/src/com/vaadin/ui/AbstractTextField.java
index 907ac629b9..c187d9e198 100644
--- a/server/src/com/vaadin/ui/AbstractTextField.java
+++ b/server/src/com/vaadin/ui/AbstractTextField.java
@@ -512,18 +512,36 @@ public abstract class AbstractTextField extends AbstractField<String> implements
}
@Override
- public void addListener(TextChangeListener listener) {
+ public void addTextChangeListener(TextChangeListener listener) {
addListener(TextChangeListener.EVENT_ID, TextChangeEvent.class,
listener, TextChangeListener.EVENT_METHOD);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addTextChangeListener(TextChangeListener)}
+ **/
+ @Deprecated
+ public void addListener(TextChangeListener listener) {
+ addTextChangeListener(listener);
+ }
+
@Override
- public void removeListener(TextChangeListener listener) {
+ public void removeTextChangeListener(TextChangeListener listener) {
removeListener(TextChangeListener.EVENT_ID, TextChangeEvent.class,
listener);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeTextChangeListener(TextChangeListener)}
+ **/
+ @Deprecated
+ public void removeListener(TextChangeListener listener) {
+ removeTextChangeListener(listener);
+ }
+
+ /**
* The text change timeout modifies how often text change events are
* communicated to the application when {@link #getTextChangeEventMode()} is
* {@link TextChangeEventMode#LAZY} or {@link TextChangeEventMode#TIMEOUT}.
@@ -661,25 +679,60 @@ public abstract class AbstractTextField extends AbstractField<String> implements
}
@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);
+ }
+
@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);
+ }
+
}
diff --git a/server/src/com/vaadin/ui/Button.java b/server/src/com/vaadin/ui/Button.java
index 68b9f1392f..2e026ebc52 100644
--- a/server/src/com/vaadin/ui/Button.java
+++ b/server/src/com/vaadin/ui/Button.java
@@ -290,23 +290,41 @@ public class Button extends AbstractComponent implements
* @param listener
* the Listener to be added.
*/
- public void addListener(ClickListener listener) {
+ public void addClickListener(ClickListener listener) {
addListener(ClickEvent.class, listener,
ClickListener.BUTTON_CLICK_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addClickListener(ClickListener)}
+ **/
+ @Deprecated
+ public void addListener(ClickListener listener) {
+ addClickListener(listener);
+ }
+
+ /**
* Removes the button click listener.
*
* @param listener
* the Listener to be removed.
*/
- public void removeListener(ClickListener listener) {
+ public void removeClickListener(ClickListener listener) {
removeListener(ClickEvent.class, listener,
ClickListener.BUTTON_CLICK_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeClickListener(ClickListener)}
+ **/
+ @Deprecated
+ public void removeListener(ClickListener listener) {
+ removeClickListener(listener);
+ }
+
+ /**
* Simulates a button click, notifying all server-side listeners.
*
* No action is taken is the button is disabled.
@@ -341,26 +359,60 @@ public class Button extends AbstractComponent implements
}
@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);
+ }
+
@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);
}
/*
diff --git a/server/src/com/vaadin/ui/CheckBox.java b/server/src/com/vaadin/ui/CheckBox.java
index 6da86b9711..149d4779d8 100644
--- a/server/src/com/vaadin/ui/CheckBox.java
+++ b/server/src/com/vaadin/ui/CheckBox.java
@@ -119,25 +119,60 @@ public class CheckBox extends AbstractField<Boolean> {
getState().setChecked(newValue);
}
- public void addListener(BlurListener listener) {
+ public void addBlurListener(BlurListener listener) {
addListener(BlurEvent.EVENT_ID, BlurEvent.class, listener,
BlurListener.blurMethod);
}
- public void removeListener(BlurListener listener) {
+ /**
+ * @deprecated Since 7.0, replaced by {@link #addBlurListener(BlurListener)}
+ **/
+ @Deprecated
+ public void addListener(BlurListener listener) {
+ addBlurListener(listener);
+ }
+
+ public void removeBlurListener(BlurListener listener) {
removeListener(BlurEvent.EVENT_ID, BlurEvent.class, listener);
}
- public void addListener(FocusListener listener) {
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeBlurListener(BlurListener)}
+ **/
+ @Deprecated
+ public void removeListener(BlurListener listener) {
+ removeBlurListener(listener);
+ }
+
+ public void addFocusListener(FocusListener listener) {
addListener(FocusEvent.EVENT_ID, FocusEvent.class, listener,
FocusListener.focusMethod);
}
- public void removeListener(FocusListener listener) {
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addFocusListener(FocusListener)}
+ **/
+ @Deprecated
+ public void addListener(FocusListener listener) {
+ addFocusListener(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);
+ }
+
+ /**
* Get the boolean value of the button state.
*
* @return True iff the button is pressed down or checked.
diff --git a/server/src/com/vaadin/ui/ComponentContainer.java b/server/src/com/vaadin/ui/ComponentContainer.java
index c2a75f9313..cee6d7300b 100644
--- a/server/src/com/vaadin/ui/ComponentContainer.java
+++ b/server/src/com/vaadin/ui/ComponentContainer.java
@@ -94,6 +94,13 @@ public interface ComponentContainer extends HasComponents {
* @param listener
* the listener to add.
*/
+ public void addComponentAttachListener(ComponentAttachListener listener);
+
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addComponentAttachListener(ComponentAttachListener)}
+ **/
+ @Deprecated
public void addListener(ComponentAttachListener listener);
/**
@@ -102,16 +109,37 @@ public interface ComponentContainer extends HasComponents {
* @param listener
* the listener to removed.
*/
+ public void removeComponentAttachListener(ComponentAttachListener listener);
+
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeComponentAttachListener(ComponentAttachListener)}
+ **/
+ @Deprecated
public void removeListener(ComponentAttachListener listener);
/**
* Listens the component detach events.
*/
+ public void addComponentDetachListener(ComponentDetachListener listener);
+
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addComponentDetachListener(ComponentDetachListener)}
+ **/
+ @Deprecated
public void addListener(ComponentDetachListener listener);
/**
* Stops the listening component detach events.
*/
+ public void removeComponentDetachListener(ComponentDetachListener listener);
+
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeComponentDetachListener(ComponentDetachListener)}
+ **/
+ @Deprecated
public void removeListener(ComponentDetachListener listener);
/**
diff --git a/server/src/com/vaadin/ui/CssLayout.java b/server/src/com/vaadin/ui/CssLayout.java
index b16bcf31df..b63c8573ba 100644
--- a/server/src/com/vaadin/ui/CssLayout.java
+++ b/server/src/com/vaadin/ui/CssLayout.java
@@ -281,19 +281,37 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier {
}
@Override
- public void addListener(LayoutClickListener listener) {
+ public void addLayoutClickListener(LayoutClickListener listener) {
addListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
LayoutClickEvent.class, listener,
LayoutClickListener.clickMethod);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addLayoutClickListener(LayoutClickListener)}
+ **/
+ @Deprecated
+ public void addListener(LayoutClickListener listener) {
+ addLayoutClickListener(listener);
+ }
+
@Override
- public void removeListener(LayoutClickListener listener) {
+ public void removeLayoutClickListener(LayoutClickListener listener) {
removeListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
LayoutClickEvent.class, listener);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeLayoutClickListener(LayoutClickListener)}
+ **/
+ @Deprecated
+ public void removeListener(LayoutClickListener listener) {
+ removeLayoutClickListener(listener);
+ }
+
+ /**
* Returns the index of the given component.
*
* @param component
diff --git a/server/src/com/vaadin/ui/CustomField.java b/server/src/com/vaadin/ui/CustomField.java
index 9ac5e2defb..7bb6e66cf9 100644
--- a/server/src/com/vaadin/ui/CustomField.java
+++ b/server/src/com/vaadin/ui/CustomField.java
@@ -221,27 +221,64 @@ public abstract class CustomField<T> extends AbstractField<T> implements
}
@Override
- public void addListener(ComponentAttachListener listener) {
+ public void addComponentAttachListener(ComponentAttachListener listener) {
addListener(ComponentContainer.ComponentAttachEvent.class, listener,
COMPONENT_ATTACHED_METHOD);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addComponentAttachListener(com.vaadin.ui.ComponentContainer.ComponentAttachListener)}
+ **/
+ @Deprecated
+ public void addListener(ComponentAttachListener listener) {
+ addComponentAttachListener(listener);
+ }
+
@Override
- public void removeListener(ComponentAttachListener listener) {
+ public void removeComponentAttachListener(ComponentAttachListener listener) {
removeListener(ComponentContainer.ComponentAttachEvent.class, listener,
COMPONENT_ATTACHED_METHOD);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeComponentAttachListener(com.vaadin.ui.ComponentContainer.ComponentAttachListener)}
+ **/
+ @Deprecated
+ public void removeListener(ComponentAttachListener listener) {
+ removeComponentAttachListener(listener);
+ }
+
@Override
- public void addListener(ComponentDetachListener listener) {
+ public void addComponentDetachListener(ComponentDetachListener listener) {
// content never detached
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addComponentDetachListener(com.vaadin.ui.ComponentContainer.ComponentDetachListener)}
+ **/
+ @Deprecated
+ public void addListener(ComponentDetachListener listener) {
+ addComponentDetachListener(listener);
+
+ }
+
@Override
- public void removeListener(ComponentDetachListener listener) {
+ public void removeComponentDetachListener(ComponentDetachListener listener) {
// content never detached
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeComponentDetachListener(com.vaadin.ui.ComponentContainer.ComponentDetachListener)}
+ **/
+ @Deprecated
+ public void removeListener(ComponentDetachListener listener) {
+ removeComponentDetachListener(listener);
+ }
+
@Override
public boolean isComponentVisible(Component childComponent) {
return true;
diff --git a/server/src/com/vaadin/ui/DateField.java b/server/src/com/vaadin/ui/DateField.java
index d3458c3cb6..712034a562 100644
--- a/server/src/com/vaadin/ui/DateField.java
+++ b/server/src/com/vaadin/ui/DateField.java
@@ -741,28 +741,63 @@ public class DateField extends AbstractField<Date> implements
}
@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);
+ }
+
@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);
+ }
+
+ /**
* Checks whether ISO 8601 week numbers are shown in the date selector.
*
* @return true if week numbers are shown, false otherwise.
diff --git a/server/src/com/vaadin/ui/Embedded.java b/server/src/com/vaadin/ui/Embedded.java
index a5175fbf7c..b3afb52249 100644
--- a/server/src/com/vaadin/ui/Embedded.java
+++ b/server/src/com/vaadin/ui/Embedded.java
@@ -526,23 +526,41 @@ public class Embedded extends AbstractComponent implements LegacyComponent {
* @param listener
* The listener to add
*/
- public void addListener(ClickListener listener) {
+ public void addClickListener(ClickListener listener) {
addListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, listener,
ClickListener.clickMethod);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addClickListener(ClickListener)}
+ **/
+ @Deprecated
+ public void addListener(ClickListener listener) {
+ addClickListener(listener);
+ }
+
+ /**
* Remove a click listener from the component. The listener should earlier
* have been added using {@link #addListener(ClickListener)}.
*
* @param listener
* The listener to remove
*/
- public void removeListener(ClickListener listener) {
+ public void removeClickListener(ClickListener listener) {
removeListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class,
listener);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeClickListener(ClickListener)}
+ **/
+ @Deprecated
+ public void removeListener(ClickListener listener) {
+ removeClickListener(listener);
+ }
+
@Override
public void changeVariables(Object source, Map<String, Object> variables) {
// TODO Remove once LegacyComponent is no longer implemented
diff --git a/server/src/com/vaadin/ui/GridLayout.java b/server/src/com/vaadin/ui/GridLayout.java
index 1efe41d653..21602c6802 100644
--- a/server/src/com/vaadin/ui/GridLayout.java
+++ b/server/src/com/vaadin/ui/GridLayout.java
@@ -1354,18 +1354,38 @@ public class GridLayout extends AbstractLayout implements
}
@Override
- public void addListener(LayoutClickListener listener) {
+ public void addLayoutClickListener(LayoutClickListener listener) {
addListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
LayoutClickEvent.class, listener,
LayoutClickListener.clickMethod);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addLayoutClickListener(LayoutClickListener)}
+ **/
@Override
- public void removeListener(LayoutClickListener listener) {
+ @Deprecated
+ public void addListener(LayoutClickListener listener) {
+ addLayoutClickListener(listener);
+ }
+
+ @Override
+ public void removeLayoutClickListener(LayoutClickListener listener) {
removeListener(EventId.LAYOUT_CLICK_EVENT_IDENTIFIER,
LayoutClickEvent.class, listener);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeLayoutClickListener(LayoutClickListener)}
+ **/
+ @Override
+ @Deprecated
+ public void removeListener(LayoutClickListener listener) {
+ removeLayoutClickListener(listener);
+ }
+
/*
* (non-Javadoc)
*
diff --git a/server/src/com/vaadin/ui/Label.java b/server/src/com/vaadin/ui/Label.java
index 81a343e937..ff4a5dcb07 100644
--- a/server/src/com/vaadin/ui/Label.java
+++ b/server/src/com/vaadin/ui/Label.java
@@ -349,11 +349,20 @@ public class Label extends AbstractComponent implements Property<String>,
* @see com.vaadin.data.Property.ValueChangeNotifier#addListener(com.vaadin.data.Property.ValueChangeListener)
*/
@Override
- public void addListener(Property.ValueChangeListener listener) {
+ public void addValueChangeListener(Property.ValueChangeListener listener) {
addListener(Label.ValueChangeEvent.class, listener, VALUE_CHANGE_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addValueChangeListener(com.vaadin.data.Property.ValueChangeListener)}
+ **/
+ @Deprecated
+ public void addListener(Property.ValueChangeListener listener) {
+ addValueChangeListener(listener);
+ }
+
+ /**
* Removes the value change listener.
*
* @param listener
@@ -361,12 +370,21 @@ public class Label extends AbstractComponent implements Property<String>,
* @see com.vaadin.data.Property.ValueChangeNotifier#removeListener(com.vaadin.data.Property.ValueChangeListener)
*/
@Override
- public void removeListener(Property.ValueChangeListener listener) {
+ public void removeValueChangeListener(Property.ValueChangeListener listener) {
removeListener(Label.ValueChangeEvent.class, listener,
VALUE_CHANGE_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeValueChangeListener(com.vaadin.data.Property.ValueChangeListener)}
+ **/
+ @Deprecated
+ public void removeListener(Property.ValueChangeListener listener) {
+ removeValueChangeListener(listener);
+ }
+
+ /**
* Emits the options change event.
*/
protected void fireValueChange() {
diff --git a/server/src/com/vaadin/ui/LoginForm.java b/server/src/com/vaadin/ui/LoginForm.java
index 0d89fd19a3..abcc7ff607 100644
--- a/server/src/com/vaadin/ui/LoginForm.java
+++ b/server/src/com/vaadin/ui/LoginForm.java
@@ -258,19 +258,37 @@ public class LoginForm extends CustomComponent {
*
* @param listener
*/
- public void addListener(LoginListener listener) {
+ public void addLoginListener(LoginListener listener) {
addListener(LoginEvent.class, listener, ON_LOGIN_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addLoginListener(LoginListener)}
+ **/
+ @Deprecated
+ public void addListener(LoginListener listener) {
+ addLoginListener(listener);
+ }
+
+ /**
* Removes LoginListener
*
* @param listener
*/
- public void removeListener(LoginListener listener) {
+ public void removeLoginListener(LoginListener listener) {
removeListener(LoginEvent.class, listener, ON_LOGIN_METHOD);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeLoginListener(LoginListener)}
+ **/
+ @Deprecated
+ public void removeListener(LoginListener listener) {
+ removeLoginListener(listener);
+ }
+
@Override
public void setWidth(float width, Unit unit) {
super.setWidth(width, unit);
diff --git a/server/src/com/vaadin/ui/OptionGroup.java b/server/src/com/vaadin/ui/OptionGroup.java
index 8846ec36e3..983a01381d 100644
--- a/server/src/com/vaadin/ui/OptionGroup.java
+++ b/server/src/com/vaadin/ui/OptionGroup.java
@@ -89,28 +89,63 @@ public class OptionGroup extends AbstractSelect implements
}
@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);
+ }
+
@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);
+ }
+
@Override
protected void setValue(Object newValue, boolean repaintIsNotNeeded) {
if (repaintIsNotNeeded) {
diff --git a/server/src/com/vaadin/ui/Panel.java b/server/src/com/vaadin/ui/Panel.java
index 07ea099981..6f399bcc19 100644
--- a/server/src/com/vaadin/ui/Panel.java
+++ b/server/src/com/vaadin/ui/Panel.java
@@ -431,24 +431,42 @@ public class Panel extends AbstractComponentContainer implements Scrollable,
* @param listener
* The listener to add
*/
- public void addListener(ClickListener listener) {
+ public void addClickListener(ClickListener listener) {
addListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, listener,
ClickListener.clickMethod);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addClickListener(ClickListener)}
+ **/
+ @Deprecated
+ public void addListener(ClickListener listener) {
+ addClickListener(listener);
+ }
+
+ /**
* Remove a click listener from the Panel. The listener should earlier have
* been added using {@link #addListener(ClickListener)}.
*
* @param listener
* The listener to remove
*/
- public void removeListener(ClickListener listener) {
+ public void removeClickListener(ClickListener listener) {
removeListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class,
listener);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeClickListener(ClickListener)}
+ **/
+ @Deprecated
+ public void removeListener(ClickListener listener) {
+ addClickListener(listener);
+ }
+
+ /**
* {@inheritDoc}
*/
@Override
diff --git a/server/src/com/vaadin/ui/PopupView.java b/server/src/com/vaadin/ui/PopupView.java
index 4dee1cfcd3..8d6d28e121 100644
--- a/server/src/com/vaadin/ui/PopupView.java
+++ b/server/src/com/vaadin/ui/PopupView.java
@@ -377,12 +377,21 @@ public class PopupView extends AbstractComponentContainer implements
* @see #removeListener(PopupVisibilityListener)
*
*/
- public void addListener(PopupVisibilityListener listener) {
+ public void addPopupVisibilityListener(PopupVisibilityListener listener) {
addListener(PopupVisibilityEvent.class, listener,
POPUP_VISIBILITY_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addPopupVisibilityListener(PopupVisibilityListener)}
+ **/
+ @Deprecated
+ public void addListener(PopupVisibilityListener listener) {
+ addPopupVisibilityListener(listener);
+ }
+
+ /**
* Removes a previously added listener, so that it no longer receives events
* when the visibility of the popup changes.
*
@@ -391,12 +400,21 @@ public class PopupView extends AbstractComponentContainer implements
* @see PopupVisibilityListener
* @see #addListener(PopupVisibilityListener)
*/
- public void removeListener(PopupVisibilityListener listener) {
+ public void removePopupVisibilityListener(PopupVisibilityListener listener) {
removeListener(PopupVisibilityEvent.class, listener,
POPUP_VISIBILITY_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removePopupVisibilityListener(PopupVisibilityListener)}
+ **/
+ @Deprecated
+ public void removeListener(PopupVisibilityListener listener) {
+ removePopupVisibilityListener(listener);
+ }
+
+ /**
* This event is received by the PopupVisibilityListeners when the
* visibility of the popup changes. You can get the new visibility directly
* with {@link #isPopupVisible()}, or get the PopupView that produced the
diff --git a/server/src/com/vaadin/ui/Select.java b/server/src/com/vaadin/ui/Select.java
index c7688df7e8..853a1efeab 100644
--- a/server/src/com/vaadin/ui/Select.java
+++ b/server/src/com/vaadin/ui/Select.java
@@ -692,26 +692,60 @@ public class Select extends AbstractSelect implements AbstractSelect.Filtering,
}
@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);
+ }
+
@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);
}
/**
diff --git a/server/src/com/vaadin/ui/TabSheet.java b/server/src/com/vaadin/ui/TabSheet.java
index 37badd993e..eb66de519f 100644
--- a/server/src/com/vaadin/ui/TabSheet.java
+++ b/server/src/com/vaadin/ui/TabSheet.java
@@ -791,23 +791,42 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
* @param listener
* the Listener to be added.
*/
- public void addListener(SelectedTabChangeListener listener) {
+ public void addSelectedTabChangeListener(SelectedTabChangeListener listener) {
addListener(SelectedTabChangeEvent.class, listener,
SELECTED_TAB_CHANGE_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addSelectedTabChangeListener(SelectedTabChangeListener)}
+ **/
+ @Deprecated
+ public void addListener(SelectedTabChangeListener listener) {
+ addSelectedTabChangeListener(listener);
+ }
+
+ /**
* Removes a tab selection listener
*
* @param listener
* the Listener to be removed.
*/
- public void removeListener(SelectedTabChangeListener listener) {
+ public void removeSelectedTabChangeListener(
+ SelectedTabChangeListener listener) {
removeListener(SelectedTabChangeEvent.class, listener,
SELECTED_TAB_CHANGE_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeSelectedTabChangeListener(SelectedTabChangeListener)}
+ **/
+ @Deprecated
+ public void removeListener(SelectedTabChangeListener listener) {
+ removeSelectedTabChangeListener(listener);
+ }
+
+ /**
* Sends an event that the currently selected tab has changed.
*/
protected void fireSelectedTabChange() {
@@ -1211,26 +1230,60 @@ public class TabSheet extends AbstractComponentContainer implements Focusable,
}
@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);
+ }
+
@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);
}
@Override
diff --git a/server/src/com/vaadin/ui/Table.java b/server/src/com/vaadin/ui/Table.java
index 118e3b3fcf..d1bdcdd708 100644
--- a/server/src/com/vaadin/ui/Table.java
+++ b/server/src/com/vaadin/ui/Table.java
@@ -4575,17 +4575,35 @@ public class Table extends AbstractSelect implements Action.Container,
}
@Override
- public void addListener(ItemClickListener listener) {
+ public void addItemClickListener(ItemClickListener listener) {
addListener(TableConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
listener, ItemClickEvent.ITEM_CLICK_METHOD);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addItemClickListener(ItemClickListener)}
+ **/
+ @Deprecated
+ public void addListener(ItemClickListener listener) {
+ addItemClickListener(listener);
+ }
+
@Override
- public void removeListener(ItemClickListener listener) {
+ public void removeItemClickListener(ItemClickListener listener) {
removeListener(TableConstants.ITEM_CLICK_EVENT_ID,
ItemClickEvent.class, listener);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeItemClickListener(ItemClickListener)}
+ **/
+ @Deprecated
+ public void removeListener(ItemClickListener listener) {
+ removeItemClickListener(listener);
+ }
+
// Identical to AbstractCompoenentContainer.setEnabled();
@Override
@@ -4926,24 +4944,42 @@ public class Table extends AbstractSelect implements Action.Container,
* @param listener
* The handler which should handle the header click events.
*/
- public void addListener(HeaderClickListener listener) {
+ public void addHeaderClickListener(HeaderClickListener listener) {
addListener(TableConstants.HEADER_CLICK_EVENT_ID,
HeaderClickEvent.class, listener,
HeaderClickEvent.HEADER_CLICK_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addHeaderClickListener(HeaderClickListener)}
+ **/
+ @Deprecated
+ public void addListener(HeaderClickListener listener) {
+ addHeaderClickListener(listener);
+ }
+
+ /**
* Removes a header click listener
*
* @param listener
* The listener to remove.
*/
- public void removeListener(HeaderClickListener listener) {
+ public void removeHeaderClickListener(HeaderClickListener listener) {
removeListener(TableConstants.HEADER_CLICK_EVENT_ID,
HeaderClickEvent.class, listener);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeHeaderClickListener(HeaderClickListener)}
+ **/
+ @Deprecated
+ public void removeListener(HeaderClickListener listener) {
+ removeHeaderClickListener(listener);
+ }
+
+ /**
* Adds a footer click listener which handles the click events when the user
* clicks on a column footer cell in the Table.
* <p>
@@ -4954,24 +4990,42 @@ public class Table extends AbstractSelect implements Action.Container,
* @param listener
* The handler which should handle the footer click events.
*/
- public void addListener(FooterClickListener listener) {
+ public void addFooterClickListener(FooterClickListener listener) {
addListener(TableConstants.FOOTER_CLICK_EVENT_ID,
FooterClickEvent.class, listener,
FooterClickEvent.FOOTER_CLICK_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addFooterClickListener(FooterClickListener)}
+ **/
+ @Deprecated
+ public void addListener(FooterClickListener listener) {
+ addFooterClickListener(listener);
+ }
+
+ /**
* Removes a footer click listener
*
* @param listener
* The listener to remove.
*/
- public void removeListener(FooterClickListener listener) {
+ public void removeFooterClickListener(FooterClickListener listener) {
removeListener(TableConstants.FOOTER_CLICK_EVENT_ID,
FooterClickEvent.class, listener);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeFooterClickListener(FooterClickListener)}
+ **/
+ @Deprecated
+ public void removeListener(FooterClickListener listener) {
+ removeFooterClickListener(listener);
+ }
+
+ /**
* Gets the footer caption beneath the rows
*
* @param propertyId
@@ -5122,24 +5176,42 @@ public class Table extends AbstractSelect implements Action.Container,
* @param listener
* The listener to attach to the Table
*/
- public void addListener(ColumnResizeListener listener) {
+ public void addColumnResizeListener(ColumnResizeListener listener) {
addListener(TableConstants.COLUMN_RESIZE_EVENT_ID,
ColumnResizeEvent.class, listener,
ColumnResizeEvent.COLUMN_RESIZE_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addColumnResizeListener(ColumnResizeListener)}
+ **/
+ @Deprecated
+ public void addListener(ColumnResizeListener listener) {
+ addColumnResizeListener(listener);
+ }
+
+ /**
* Removes a column resize listener from the Table.
*
* @param listener
* The listener to remove
*/
- public void removeListener(ColumnResizeListener listener) {
+ public void removeColumnResizeListener(ColumnResizeListener listener) {
removeListener(TableConstants.COLUMN_RESIZE_EVENT_ID,
ColumnResizeEvent.class, listener);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeColumnResizeListener(ColumnResizeListener)}
+ **/
+ @Deprecated
+ public void removeListener(ColumnResizeListener listener) {
+ removeColumnResizeListener(listener);
+ }
+
+ /**
* This event is fired when a columns are reordered by the end user user.
*/
public static class ColumnReorderEvent extends Component.Event {
@@ -5188,23 +5260,41 @@ public class Table extends AbstractSelect implements Action.Container,
* @param listener
* The listener to attach to the Table
*/
- public void addListener(ColumnReorderListener listener) {
+ public void addColumnReorderListener(ColumnReorderListener listener) {
addListener(TableConstants.COLUMN_REORDER_EVENT_ID,
ColumnReorderEvent.class, listener, ColumnReorderEvent.METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addColumnReorderListener(ColumnReorderListener)}
+ **/
+ @Deprecated
+ public void addListener(ColumnReorderListener listener) {
+ addColumnReorderListener(listener);
+ }
+
+ /**
* Removes a column reorder listener from the Table.
*
* @param listener
* The listener to remove
*/
- public void removeListener(ColumnReorderListener listener) {
+ public void removeColumnReorderListener(ColumnReorderListener listener) {
removeListener(TableConstants.COLUMN_REORDER_EVENT_ID,
ColumnReorderEvent.class, listener);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeColumnReorderListener(ColumnReorderListener)}
+ **/
+ @Deprecated
+ public void removeListener(ColumnReorderListener listener) {
+ removeColumnReorderListener(listener);
+ }
+
+ /**
* Set the item description generator which generates tooltips for cells and
* rows in the Table
*
diff --git a/server/src/com/vaadin/ui/Tree.java b/server/src/com/vaadin/ui/Tree.java
index 529847d54c..9cf1aa3511 100644
--- a/server/src/com/vaadin/ui/Tree.java
+++ b/server/src/com/vaadin/ui/Tree.java
@@ -906,22 +906,40 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* @param listener
* the Listener to be added.
*/
- public void addListener(ExpandListener listener) {
+ public void addExpandListener(ExpandListener listener) {
addListener(ExpandEvent.class, listener, ExpandListener.EXPAND_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addExpandListener(ExpandListener)}
+ **/
+ @Deprecated
+ public void addListener(ExpandListener listener) {
+ addExpandListener(listener);
+ }
+
+ /**
* Removes the expand listener.
*
* @param listener
* the Listener to be removed.
*/
- public void removeListener(ExpandListener listener) {
+ public void removeExpandListener(ExpandListener listener) {
removeListener(ExpandEvent.class, listener,
ExpandListener.EXPAND_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeExpandListener(ExpandListener)}
+ **/
+ @Deprecated
+ public void removeListener(ExpandListener listener) {
+ removeExpandListener(listener);
+ }
+
+ /**
* Emits the expand event.
*
* @param itemId
@@ -991,23 +1009,41 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* @param listener
* the Listener to be added.
*/
- public void addListener(CollapseListener listener) {
+ public void addCollapseListener(CollapseListener listener) {
addListener(CollapseEvent.class, listener,
CollapseListener.COLLAPSE_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addCollapseListener(CollapseListener)}
+ **/
+ @Deprecated
+ public void addListener(CollapseListener listener) {
+ addCollapseListener(listener);
+ }
+
+ /**
* Removes the collapse listener.
*
* @param listener
* the Listener to be removed.
*/
- public void removeListener(CollapseListener listener) {
+ public void removeCollapseListener(CollapseListener listener) {
removeListener(CollapseEvent.class, listener,
CollapseListener.COLLAPSE_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeCollapseListener(CollapseListener)}
+ **/
+ @Deprecated
+ public void removeListener(CollapseListener listener) {
+ removeCollapseListener(listener);
+ }
+
+ /**
* Emits collapse event.
*
* @param itemId
@@ -1162,18 +1198,36 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
private DropHandler dropHandler;
@Override
- public void addListener(ItemClickListener listener) {
+ public void addItemClickListener(ItemClickListener listener) {
addListener(TreeConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
listener, ItemClickEvent.ITEM_CLICK_METHOD);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addItemClickListener(ItemClickListener)}
+ **/
+ @Deprecated
+ public void addListener(ItemClickListener listener) {
+ addItemClickListener(listener);
+ }
+
@Override
- public void removeListener(ItemClickListener listener) {
+ public void removeItemClickListener(ItemClickListener listener) {
removeListener(TreeConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
listener);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeItemClickListener(ItemClickListener)}
+ **/
+ @Deprecated
+ public void removeListener(ItemClickListener listener) {
+ removeItemClickListener(listener);
+ }
+
+ /**
* Sets the {@link ItemStyleGenerator} to be used with this tree.
*
* @param itemStyleGenerator
diff --git a/server/src/com/vaadin/ui/TreeTable.java b/server/src/com/vaadin/ui/TreeTable.java
index dd79461f37..ef5850a8af 100644
--- a/server/src/com/vaadin/ui/TreeTable.java
+++ b/server/src/com/vaadin/ui/TreeTable.java
@@ -752,22 +752,40 @@ public class TreeTable extends Table implements Hierarchical {
* @param listener
* the Listener to be added.
*/
- public void addListener(ExpandListener listener) {
+ public void addExpandListener(ExpandListener listener) {
addListener(ExpandEvent.class, listener, ExpandListener.EXPAND_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addExpandListener(ExpandListener)}
+ **/
+ @Deprecated
+ public void addListener(ExpandListener listener) {
+ addExpandListener(listener);
+ }
+
+ /**
* Removes an expand listener.
*
* @param listener
* the Listener to be removed.
*/
- public void removeListener(ExpandListener listener) {
+ public void removeExpandListener(ExpandListener listener) {
removeListener(ExpandEvent.class, listener,
ExpandListener.EXPAND_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeExpandListener(ExpandListener)}
+ **/
+ @Deprecated
+ public void removeListener(ExpandListener listener) {
+ removeExpandListener(listener);
+ }
+
+ /**
* Emits an expand event.
*
* @param itemId
@@ -783,23 +801,41 @@ public class TreeTable extends Table implements Hierarchical {
* @param listener
* the Listener to be added.
*/
- public void addListener(CollapseListener listener) {
+ public void addCollapseListener(CollapseListener listener) {
addListener(CollapseEvent.class, listener,
CollapseListener.COLLAPSE_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addCollapseListener(CollapseListener)}
+ **/
+ @Deprecated
+ public void addListener(CollapseListener listener) {
+ addCollapseListener(listener);
+ }
+
+ /**
* Removes a collapse listener.
*
* @param listener
* the Listener to be removed.
*/
- public void removeListener(CollapseListener listener) {
+ public void removeCollapseListener(CollapseListener listener) {
removeListener(CollapseEvent.class, listener,
CollapseListener.COLLAPSE_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeCollapseListener(CollapseListener)}
+ **/
+ @Deprecated
+ public void removeListener(CollapseListener listener) {
+ removeCollapseListener(listener);
+ }
+
+ /**
* Emits a collapse event.
*
* @param itemId
diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java
index f3797252db..a59b96d27a 100644
--- a/server/src/com/vaadin/ui/UI.java
+++ b/server/src/com/vaadin/ui/UI.java
@@ -1094,45 +1094,39 @@ public abstract class UI extends AbstractComponentContainer implements
* @param listener
* The listener to add
*/
- public void addListener(ClickListener listener) {
+ public void addClickListener(ClickListener listener) {
addListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, listener,
ClickListener.clickMethod);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addClickListener(ClickListener)}
+ **/
+ @Deprecated
+ public void addListener(ClickListener listener) {
+ addClickListener(listener);
+ }
+
+ /**
* Remove a click listener from the UI. The listener should earlier have
* been added using {@link #addListener(ClickListener)}.
*
* @param listener
* The listener to remove
*/
- public void removeListener(ClickListener listener) {
+ public void removeClickListener(ClickListener listener) {
removeListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class,
listener);
}
/**
- * Adds a close listener to the UI. The listener is called when the UI is
- * removed from the application.
- *
- * @param listener
- * The listener to add.
- */
- public void addListener(CloseListener listener) {
- addListener(CloseEvent.CLOSE_EVENT_IDENTIFIER, CloseEvent.class,
- listener, CloseListener.closeMethod);
- }
-
- /**
- * Removes a close listener from the UI if it has previously been added with
- * {@link #addListener(ClickListener)}. Otherwise, has no effect.
- *
- * @param listener
- * The listener to remove.
- */
- public void removeListener(CloseListener listener) {
- removeListener(CloseEvent.CLOSE_EVENT_IDENTIFIER, CloseEvent.class,
- listener);
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeClickListener(ClickListener)}
+ **/
+ @Deprecated
+ public void removeListener(ClickListener listener) {
+ removeClickListener(listener);
}
@Override
diff --git a/server/src/com/vaadin/ui/Upload.java b/server/src/com/vaadin/ui/Upload.java
index 765a52e542..2323b22e17 100644
--- a/server/src/com/vaadin/ui/Upload.java
+++ b/server/src/com/vaadin/ui/Upload.java
@@ -570,87 +570,159 @@ public class Upload extends AbstractComponent implements Component.Focusable,
* @param listener
* the Listener to be added.
*/
- public void addListener(StartedListener listener) {
+ public void addStartedListener(StartedListener listener) {
addListener(StartedEvent.class, listener, UPLOAD_STARTED_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addStartedListener(StartedListener)}
+ **/
+ @Deprecated
+ public void addListener(StartedListener listener) {
+ addStartedListener(listener);
+ }
+
+ /**
* Removes the upload started event listener.
*
* @param listener
* the Listener to be removed.
*/
- public void removeListener(StartedListener listener) {
+ public void removeStartedListener(StartedListener listener) {
removeListener(StartedEvent.class, listener, UPLOAD_STARTED_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeStartedListener(StartedListener)}
+ **/
+ @Deprecated
+ public void removeListener(StartedListener listener) {
+ removeStartedListener(listener);
+ }
+
+ /**
* Adds the upload received event listener.
*
* @param listener
* the Listener to be added.
*/
- public void addListener(FinishedListener listener) {
+ public void addFinishedListener(FinishedListener listener) {
addListener(FinishedEvent.class, listener, UPLOAD_FINISHED_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addFinishedListener(FinishedListener)}
+ **/
+ @Deprecated
+ public void addListener(FinishedListener listener) {
+ addFinishedListener(listener);
+ }
+
+ /**
* Removes the upload received event listener.
*
* @param listener
* the Listener to be removed.
*/
- public void removeListener(FinishedListener listener) {
+ public void removeFinishedListener(FinishedListener listener) {
removeListener(FinishedEvent.class, listener, UPLOAD_FINISHED_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeFinishedListener(FinishedListener)}
+ **/
+ @Deprecated
+ public void removeListener(FinishedListener listener) {
+ removeFinishedListener(listener);
+ }
+
+ /**
* Adds the upload interrupted event listener.
*
* @param listener
* the Listener to be added.
*/
- public void addListener(FailedListener listener) {
+ public void addFailedListener(FailedListener listener) {
addListener(FailedEvent.class, listener, UPLOAD_FAILED_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addFailedListener(FailedListener)}
+ **/
+ @Deprecated
+ public void addListener(FailedListener listener) {
+ addFailedListener(listener);
+ }
+
+ /**
* Removes the upload interrupted event listener.
*
* @param listener
* the Listener to be removed.
*/
- public void removeListener(FailedListener listener) {
+ public void removeFailedListener(FailedListener listener) {
removeListener(FailedEvent.class, listener, UPLOAD_FAILED_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeFailedListener(FailedListener)}
+ **/
+ @Deprecated
+ public void removeListener(FailedListener listener) {
+ removeFailedListener(listener);
+ }
+
+ /**
* Adds the upload success event listener.
*
* @param listener
* the Listener to be added.
*/
- public void addListener(SucceededListener listener) {
+ public void addSucceededListener(SucceededListener listener) {
addListener(SucceededEvent.class, listener, UPLOAD_SUCCEEDED_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addSucceededListener(SucceededListener)}
+ **/
+ @Deprecated
+ public void addListener(SucceededListener listener) {
+ addSucceededListener(listener);
+ }
+
+ /**
* Removes the upload success event listener.
*
* @param listener
* the Listener to be removed.
*/
- public void removeListener(SucceededListener listener) {
+ public void removeSucceededListener(SucceededListener listener) {
removeListener(SucceededEvent.class, listener, UPLOAD_SUCCEEDED_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeSucceededListener(SucceededListener)}
+ **/
+ @Deprecated
+ public void removeListener(SucceededListener listener) {
+ removeSucceededListener(listener);
+ }
+
+ /**
* Adds the upload success event listener.
*
* @param listener
* the Listener to be added.
*/
- public void addListener(ProgressListener listener) {
+ public void addProgressListener(ProgressListener listener) {
if (progressListeners == null) {
progressListeners = new LinkedHashSet<ProgressListener>();
}
@@ -658,18 +730,36 @@ public class Upload extends AbstractComponent implements Component.Focusable,
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addProgressListener(ProgressListener)}
+ **/
+ @Deprecated
+ public void addListener(ProgressListener listener) {
+ addProgressListener(listener);
+ }
+
+ /**
* Removes the upload success event listener.
*
* @param listener
* the Listener to be removed.
*/
- public void removeListener(ProgressListener listener) {
+ public void removeProgressListener(ProgressListener listener) {
if (progressListeners != null) {
progressListeners.remove(listener);
}
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeProgressListener(ProgressListener)}
+ **/
+ @Deprecated
+ public void removeListener(ProgressListener listener) {
+ removeProgressListener(listener);
+ }
+
+ /**
* Emit upload received event.
*
* @param filename
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