Example usage for com.vaadin.ui DragAndDropWrapper getParent

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

Introduction

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

Prototype

@Override
    public HasComponents getParent() 

Source Link

Usage

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

License:Apache License

/**
 * Get DragAndDropWrapper for given component
 * @param component Component added to this DndMasonryLayout
 * @return Wrapper of component or null if not set yet, or if component is not under this layout
 *//*from   w  w  w . ja v a 2 s. c o  m*/
protected DragAndDropWrapper getComponentDnDWrapper(Component component) {
    if (!(component.getParent() instanceof DragAndDropWrapper)) {
        return null;
    }
    DragAndDropWrapper wrapper = (DragAndDropWrapper) component.getParent();
    if (wrapper.getParent() != this) {
        return null;
    }
    return wrapper;
}