aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui/CustomLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/vaadin/ui/CustomLayout.java')
-rw-r--r--src/com/vaadin/ui/CustomLayout.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/vaadin/ui/CustomLayout.java b/src/com/vaadin/ui/CustomLayout.java
index 1d08860b50..0c11ff6114 100644
--- a/src/com/vaadin/ui/CustomLayout.java
+++ b/src/com/vaadin/ui/CustomLayout.java
@@ -185,6 +185,16 @@ public class CustomLayout extends AbstractLayout {
}
/**
+ * Gets the number of contained components. Consistent with the iterator
+ * returned by {@link #getComponentIterator()}.
+ *
+ * @return the number of contained components
+ */
+ public int getComponentCount() {
+ return slots.values().size();
+ }
+
+ /**
* Gets the child-component by its location.
*
* @param location