diff options
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractField.java')
-rw-r--r-- | server/src/com/vaadin/ui/AbstractField.java | 46 |
1 files changed, 42 insertions, 4 deletions
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. */ |