summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui/PopupView.java
diff options
context:
space:
mode:
authorHenri Sara <henri.sara@itmill.com>2010-10-26 14:58:06 +0000
committerHenri Sara <henri.sara@itmill.com>2010-10-26 14:58:06 +0000
commit089f43092d7bf6f99e5abca56415d8cf6fcc3cf2 (patch)
treebfb23494c862d7072ffbdf127ca9518e149507cd /src/com/vaadin/ui/PopupView.java
parenta98ecb2b8d2949eec1b32a66eb8e1f5cddb5910d (diff)
downloadvaadin-framework-089f43092d7bf6f99e5abca56415d8cf6fcc3cf2.tar.gz
vaadin-framework-089f43092d7bf6f99e5abca56415d8cf6fcc3cf2.zip
#4611 add getComponentCount() method for ComponentContainer implementations
svn changeset:15724/svn branch:6.5
Diffstat (limited to 'src/com/vaadin/ui/PopupView.java')
-rw-r--r--src/com/vaadin/ui/PopupView.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/vaadin/ui/PopupView.java b/src/com/vaadin/ui/PopupView.java
index 506b5380a7..4e1f387504 100644
--- a/src/com/vaadin/ui/PopupView.java
+++ b/src/com/vaadin/ui/PopupView.java
@@ -227,6 +227,16 @@ public class PopupView extends AbstractComponentContainer {
}
/**
+ * Gets the number of contained components. Consistent with the iterator
+ * returned by {@link #getComponentIterator()}.
+ *
+ * @return the number of contained components (zero or one)
+ */
+ public int getComponentCount() {
+ return (visibleComponent != null ? 1 : 0);
+ }
+
+ /**
* Not supported in this implementation.
*
* @see com.vaadin.ui.AbstractComponentContainer#removeAllComponents()