Example usage for com.vaadin.ui DragAndDropWrapper iterator

List of usage examples for com.vaadin.ui DragAndDropWrapper iterator

Introduction

In this page you can find the example usage for com.vaadin.ui DragAndDropWrapper iterator.

Prototype

@Override
    public Iterator<Component> iterator() 

Source Link

Usage

From source file:org.vaadin.alump.masonry.DnDMasonryLayout.java

License:Apache License

/**
 * Get component in layout with given index. When you index components with this, use
 * {@link #getComponentCountInLayout()} as indexing limit.
 * @param index Index of component searched
 * @return Component at given index//from  ww  w  .  j a va 2  s  . c  o  m
 */
public Component getComponentInLayout(int index) {
    DragAndDropWrapper wrapper = (DragAndDropWrapper) getMasonryLayout().getComponent(index);
    if (wrapper != null) {
        return wrapper.iterator().next();
    } else {
        return null;
    }
}