Example usage for com.vaadin.ui Layout getComponentCount

List of usage examples for com.vaadin.ui Layout getComponentCount

Introduction

In this page you can find the example usage for com.vaadin.ui Layout getComponentCount.

Prototype

public int getComponentCount();

Source Link

Document

Gets the number of children this ComponentContainer has.

Usage

From source file:probe.com.model.util.vaadintoimageutil.Convertor.java

private void fillVaadinMap(int postion, Layout parentComponent) {

    if (parentComponent.getComponentCount() > 0) {
        for (int i = 0; i < parentComponent.getComponentCount(); i++) {
            fillVaadinMap(postion + 1, (Layout) parentComponent.getComponentIterator().next());
        }//from   w w  w . j  av  a2  s .  c o m
    }
    if (parentComponent.getClass().getName().equalsIgnoreCase(Vertical_Layout)) {
        JPanel comp = convertVerticalLayout((VerticalLayout) parentComponent);
        if (!vaadinLevelMap.containsKey(postion)) {
            HashSet<Layout> set = new HashSet<Layout>();
            vaadinLevelMap.put(postion, set);
            HashSet<JPanel> jPaneltset = new HashSet<JPanel>();
            jpanelLevelMap.put(postion, jPaneltset);
        }
        Set<Layout> set = vaadinLevelMap.get(postion);
        Set<JPanel> jPaneltset = jpanelLevelMap.get(postion);
        set.add(parentComponent);
        jPaneltset.add(comp);
        vaadinLevelMap.put(postion, set);
        jpanelLevelMap.put(postion, jPaneltset);
    }

}