diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-07-23 15:23:43 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-07-23 15:23:43 +0300 |
commit | 3604bf01ded16d21041cbb655632429e00c94639 (patch) | |
tree | 9bf7ae9d3a33e6b672c164e696a24aef08ebc13e /src/com/vaadin/ui/CustomField.java | |
parent | b7982bac6d8bca02fc76c9974ffd1c24d9a06f04 (diff) | |
download | vaadin-framework-3604bf01ded16d21041cbb655632429e00c94639.tar.gz vaadin-framework-3604bf01ded16d21041cbb655632429e00c94639.zip |
Add Java 6 @Override annotations to all methods from interfaces
Diffstat (limited to 'src/com/vaadin/ui/CustomField.java')
-rw-r--r-- | src/com/vaadin/ui/CustomField.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/com/vaadin/ui/CustomField.java b/src/com/vaadin/ui/CustomField.java index 0998c11612..ab3797a58c 100644 --- a/src/com/vaadin/ui/CustomField.java +++ b/src/com/vaadin/ui/CustomField.java @@ -123,28 +123,34 @@ public abstract class CustomField<T> extends AbstractField<T> implements Serializable { boolean first = (root != null); + @Override public boolean hasNext() { return first; } + @Override public Component next() { first = false; return getContent(); } + @Override public void remove() { throw new UnsupportedOperationException(); } } + @Override public Iterator<Component> getComponentIterator() { return new ComponentIterator(); } + @Override public Iterator<Component> iterator() { return getComponentIterator(); } + @Override public int getComponentCount() { return (null != getContent()) ? 1 : 0; } @@ -163,22 +169,27 @@ public abstract class CustomField<T> extends AbstractField<T> implements // TODO remove these methods when ComponentContainer interface is cleaned up + @Override public void addComponent(Component c) { throw new UnsupportedOperationException(); } + @Override public void removeComponent(Component c) { throw new UnsupportedOperationException(); } + @Override public void removeAllComponents() { throw new UnsupportedOperationException(); } + @Override public void replaceComponent(Component oldComponent, Component newComponent) { throw new UnsupportedOperationException(); } + @Override public void moveComponentsFrom(ComponentContainer source) { throw new UnsupportedOperationException(); } @@ -197,24 +208,29 @@ public abstract class CustomField<T> extends AbstractField<T> implements } } + @Override public void addListener(ComponentAttachListener listener) { addListener(ComponentContainer.ComponentAttachEvent.class, listener, COMPONENT_ATTACHED_METHOD); } + @Override public void removeListener(ComponentAttachListener listener) { removeListener(ComponentContainer.ComponentAttachEvent.class, listener, COMPONENT_ATTACHED_METHOD); } + @Override public void addListener(ComponentDetachListener listener) { // content never detached } + @Override public void removeListener(ComponentDetachListener listener) { // content never detached } + @Override public boolean isComponentVisible(Component childComponent) { return true; } |