Example usage for com.vaadin.ui Layout getComponentIterator

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

Introduction

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

Prototype

@Deprecated
public Iterator<Component> getComponentIterator();

Source Link

Document

Gets an iterator to the collection of contained components.

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());
        }/*  w  w w  .j  ava2  s.  co  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);
    }

}