@Override protected Slot getSlot(Element e, NativeEvent event) { Slot slot = null; if (getLayout().getElement() == e) { // Most likely between components, use the closes one in that case slot = findSlotHorizontally(12, event); } else { slot = WidgetUtil.findWidget(e, Slot.class); if (slot == null) { return null; } VAbstractOrderedLayout layout = VDragDropUtil.getSlotLayout(slot); while (layout != getLayout() && getLayout().getElement().isOrHasChild(e.getParentElement())) { e = e.getParentElement(); slot = WidgetUtil.findWidget(e, Slot.class); if (slot == null) { return null; } layout = VDragDropUtil.getSlotLayout(slot); } } return slot; }
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { VDragDropUtil.updateDropHandlerFromUIDL(uidl, this, new VDDCssLayoutDropHandler(this)); }
@Override protected void init() { super.init(); VDragDropUtil.listenToStateChangeEvents(this, getWidget()); }