diff options
author | Artur Signell <artur@vaadin.com> | 2012-11-06 18:06:20 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-11-06 18:06:20 +0200 |
commit | 438854e549b7f44f091f47363dfc050d9a2fa82a (patch) | |
tree | b0e585deefaddab537943a733b08fb66740ae4dc /server | |
parent | 9f441030134a04f551c147c569ddce92e1cec9f6 (diff) | |
download | vaadin-framework-438854e549b7f44f091f47363dfc050d9a2fa82a.tar.gz vaadin-framework-438854e549b7f44f091f47363dfc050d9a2fa82a.zip |
AbstractComponentContainer should implement getComponentIterator and not iterator (#10144)
Change-Id: I092cc71dfa9ded74f6624e6808a9ec1de7cf1cb5
Diffstat (limited to 'server')
-rw-r--r-- | server/src/com/vaadin/ui/AbsoluteLayout.java | 2 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/AbstractComponentContainer.java | 4 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/AbstractOrderedLayout.java | 2 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/AbstractSplitPanel.java | 2 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/CssLayout.java | 2 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/CustomComponent.java | 2 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/CustomField.java | 8 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/CustomLayout.java | 2 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/GridLayout.java | 2 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/Panel.java | 2 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/PopupView.java | 2 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/TabSheet.java | 2 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/UI.java | 2 |
13 files changed, 13 insertions, 21 deletions
diff --git a/server/src/com/vaadin/ui/AbsoluteLayout.java b/server/src/com/vaadin/ui/AbsoluteLayout.java index e3eecaac12..26d9b5576a 100644 --- a/server/src/com/vaadin/ui/AbsoluteLayout.java +++ b/server/src/com/vaadin/ui/AbsoluteLayout.java @@ -70,7 +70,7 @@ public class AbsoluteLayout extends AbstractLayout implements * absolute layout. */ @Override - public Iterator<Component> getComponentIterator() { + public Iterator<Component> iterator() { return componentToCoordinates.keySet().iterator(); } diff --git a/server/src/com/vaadin/ui/AbstractComponentContainer.java b/server/src/com/vaadin/ui/AbstractComponentContainer.java index 12ceb5a801..fdc753b57c 100644 --- a/server/src/com/vaadin/ui/AbstractComponentContainer.java +++ b/server/src/com/vaadin/ui/AbstractComponentContainer.java @@ -379,8 +379,8 @@ public abstract class AbstractComponentContainer extends AbstractComponent } @Override - public Iterator<Component> iterator() { - return getComponentIterator(); + public Iterator<Component> getComponentIterator() { + return iterator(); } /* diff --git a/server/src/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/com/vaadin/ui/AbstractOrderedLayout.java index cb3d9cfe9f..729862a93e 100644 --- a/server/src/com/vaadin/ui/AbstractOrderedLayout.java +++ b/server/src/com/vaadin/ui/AbstractOrderedLayout.java @@ -182,7 +182,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements * @return the Iterator of the components inside the container. */ @Override - public Iterator<Component> getComponentIterator() { + public Iterator<Component> iterator() { return components.iterator(); } diff --git a/server/src/com/vaadin/ui/AbstractSplitPanel.java b/server/src/com/vaadin/ui/AbstractSplitPanel.java index dd6ff50efb..086357f224 100644 --- a/server/src/com/vaadin/ui/AbstractSplitPanel.java +++ b/server/src/com/vaadin/ui/AbstractSplitPanel.java @@ -224,7 +224,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { */ @Override - public Iterator<Component> getComponentIterator() { + public Iterator<Component> iterator() { return new ComponentIterator(); } diff --git a/server/src/com/vaadin/ui/CssLayout.java b/server/src/com/vaadin/ui/CssLayout.java index 172258a5fe..aa072df946 100644 --- a/server/src/com/vaadin/ui/CssLayout.java +++ b/server/src/com/vaadin/ui/CssLayout.java @@ -210,7 +210,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier { * @return the Iterator of the components inside the container. */ @Override - public Iterator<Component> getComponentIterator() { + public Iterator<Component> iterator() { return components.iterator(); } diff --git a/server/src/com/vaadin/ui/CustomComponent.java b/server/src/com/vaadin/ui/CustomComponent.java index b67fa89ecb..d3d5bb43b0 100644 --- a/server/src/com/vaadin/ui/CustomComponent.java +++ b/server/src/com/vaadin/ui/CustomComponent.java @@ -128,7 +128,7 @@ public class CustomComponent extends AbstractComponentContainer { } @Override - public Iterator<Component> getComponentIterator() { + public Iterator<Component> iterator() { return new ComponentIterator(); } diff --git a/server/src/com/vaadin/ui/CustomField.java b/server/src/com/vaadin/ui/CustomField.java index 67695fe54b..23460d824e 100644 --- a/server/src/com/vaadin/ui/CustomField.java +++ b/server/src/com/vaadin/ui/CustomField.java @@ -146,14 +146,6 @@ public abstract class CustomField<T> extends AbstractField<T> implements } } - /** - * @deprecated As of 7.0, use {@link #iterator()} instead. - */ - @Deprecated - public Iterator<Component> getComponentIterator() { - return iterator(); - } - @Override public Iterator<Component> iterator() { return new ComponentIterator(); diff --git a/server/src/com/vaadin/ui/CustomLayout.java b/server/src/com/vaadin/ui/CustomLayout.java index 19bd5a54b3..b75d241fe5 100644 --- a/server/src/com/vaadin/ui/CustomLayout.java +++ b/server/src/com/vaadin/ui/CustomLayout.java @@ -191,7 +191,7 @@ public class CustomLayout extends AbstractLayout implements LegacyComponent { * @return the Iterator of the components inside the container. */ @Override - public Iterator<Component> getComponentIterator() { + public Iterator<Component> iterator() { return slots.values().iterator(); } diff --git a/server/src/com/vaadin/ui/GridLayout.java b/server/src/com/vaadin/ui/GridLayout.java index 39be937c01..8fda05baf1 100644 --- a/server/src/com/vaadin/ui/GridLayout.java +++ b/server/src/com/vaadin/ui/GridLayout.java @@ -460,7 +460,7 @@ public class GridLayout extends AbstractLayout implements * @return the Iterator of the components inside the layout. */ @Override - public Iterator<Component> getComponentIterator() { + public Iterator<Component> iterator() { return Collections.unmodifiableCollection(components).iterator(); } diff --git a/server/src/com/vaadin/ui/Panel.java b/server/src/com/vaadin/ui/Panel.java index 8d501cd949..521c3e3d27 100644 --- a/server/src/com/vaadin/ui/Panel.java +++ b/server/src/com/vaadin/ui/Panel.java @@ -240,7 +240,7 @@ public class Panel extends AbstractComponentContainer implements Scrollable, * @see com.vaadin.ui.ComponentContainer#getComponentIterator() */ @Override - public Iterator<Component> getComponentIterator() { + public Iterator<Component> iterator() { return Collections.singleton((Component) content).iterator(); } diff --git a/server/src/com/vaadin/ui/PopupView.java b/server/src/com/vaadin/ui/PopupView.java index 97a198f73f..de07630029 100644 --- a/server/src/com/vaadin/ui/PopupView.java +++ b/server/src/com/vaadin/ui/PopupView.java @@ -224,7 +224,7 @@ public class PopupView extends AbstractComponentContainer implements * @see com.vaadin.ui.ComponentContainer#getComponentIterator() */ @Override - public Iterator<Component> getComponentIterator() { + public Iterator<Component> iterator() { return new SingleComponentIterator(visibleComponent); } diff --git a/server/src/com/vaadin/ui/TabSheet.java b/server/src/com/vaadin/ui/TabSheet.java index c45789ed33..227743e9f4 100644 --- a/server/src/com/vaadin/ui/TabSheet.java +++ b/server/src/com/vaadin/ui/TabSheet.java @@ -133,7 +133,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, */ @Override - public Iterator<Component> getComponentIterator() { + public Iterator<Component> iterator() { return Collections.unmodifiableList(components).iterator(); } diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java index 4d743859da..d2f323e5fe 100644 --- a/server/src/com/vaadin/ui/UI.java +++ b/server/src/com/vaadin/ui/UI.java @@ -333,7 +333,7 @@ public abstract class UI extends AbstractComponentContainer implements * @see com.vaadin.ui.ComponentContainer#getComponentIterator() */ @Override - public Iterator<Component> getComponentIterator() { + public Iterator<Component> iterator() { // TODO could directly create some kind of combined iterator instead of // creating a new ArrayList ArrayList<Component> components = new ArrayList<Component>(); |