List of usage examples for com.vaadin.client.ui.dd VAcceptCallback VAcceptCallback
VAcceptCallback
From source file:com.haulmont.cuba.web.widgets.client.addons.dragdroplayouts.ui.accordion.VDDAccordionDropHandler.java
License:Apache License
@Override public void dragOver(VDragEvent drag) { getLayout().deEmphasis();/* w w w. j av a2 s. com*/ getLayout().updateDragDetails(drag); getLayout().postOverHook(drag); // Validate the drop validate(new VAcceptCallback() { public void accepted(VDragEvent event) { getLayout().emphasis(event.getElementOver(), event); } }, drag); }
From source file:com.haulmont.cuba.web.widgets.client.addons.dragdroplayouts.ui.csslayout.VDDCssLayoutDropHandler.java
License:Apache License
@Override public void dragOver(VDragEvent drag) { getLayout().updateDragDetails(drag); getLayout().postOverHook(drag);/*from w w w. j a va2 s .c om*/ // Validate the drop validate(new VAcceptCallback() { public void accepted(VDragEvent event) { getLayout().updateDrag(event); } }, drag); }
From source file:com.haulmont.cuba.web.widgets.client.addons.dragdroplayouts.ui.formlayout.VDDFormLayoutDropHandler.java
License:Apache License
@Override public void dragOver(VDragEvent drag) { // Remove any emphasis getLayout().emphasis(null, null);//ww w . j av a 2 s. c o m // Update the drop details so we can validate the drop Widget c = getTableRowWidgetFromDragEvent(drag); if (c != null) { getLayout().updateDragDetails(c, drag); } else { getLayout().updateDragDetails(getLayout(), drag); } getLayout().postOverHook(drag); // Validate the drop validate(new VAcceptCallback() { public void accepted(VDragEvent event) { Widget c = getTableRowWidgetFromDragEvent(event); if (c != null) { getLayout().emphasis(c, event); } else { getLayout().emphasis(getLayout(), event); } } }, drag); }
From source file:com.haulmont.cuba.web.widgets.client.addons.dragdroplayouts.ui.gridlayout.VDDGridLayoutDropHandler.java
License:Apache License
@Override public void dragOver(VDragEvent drag) { // Remove emphasis from previous selection getLayout().deEmphasis();/*www. j a v a 2s. com*/ // Update the drop details so we can then validate them getLayout().updateDragDetails(drag); getLayout().postOverHook(drag); // Emphasis drop location validate(new VAcceptCallback() { public void accepted(VDragEvent event) { CellDetails cd = getLayout().getCellDetails(event); if (cd != null) { getLayout().emphasis(cd, event); } } }, drag); }
From source file:com.haulmont.cuba.web.widgets.client.addons.dragdroplayouts.ui.horizontallayout.VDDHorizontalLayoutDropHandler.java
License:Apache License
@Override public void dragOver(VDragEvent drag) { // Remove any emphasis getLayout().emphasis(null, null);/* w w w . j a va 2s. co m*/ Slot slot = getSlot(drag.getElementOver(), drag.getCurrentGwtEvent()); if (slot != null) { getLayout().updateDragDetails(slot, drag); } else { getLayout().updateDragDetails(getLayout(), drag); } getLayout().postOverHook(drag); // Validate the drop validate(new VAcceptCallback() { public void accepted(VDragEvent event) { Slot slot = getSlot(event.getElementOver(), event.getCurrentGwtEvent()); if (slot != null) { getLayout().emphasis(slot, event); } else { getLayout().emphasis(getLayout(), event); } } }, drag); }
From source file:com.haulmont.cuba.web.widgets.client.addons.dragdroplayouts.ui.horizontalsplitpanel.VDDHorizontalSplitPanelDropHandler.java
License:Apache License
@Override public void dragOver(VDragEvent drag) { getLayout().deEmphasis();// ww w.j a v a 2 s .c o m getLayout().updateDragDetails(drag); getLayout().postOverHook(drag); ComponentConnector widgetConnector = (ComponentConnector) drag.getTransferable() .getData(Constants.TRANSFERABLE_DETAIL_COMPONENT); if (widgetConnector != null && getLayout().equals(widgetConnector.getWidget())) { return; } // Validate the drop validate(new VAcceptCallback() { public void accepted(VDragEvent event) { getLayout().emphasis(event.getElementOver()); } }, drag); }
From source file:com.haulmont.cuba.web.widgets.client.addons.dragdroplayouts.ui.panel.VDDPanelDropHandler.java
License:Apache License
@Override public void dragOver(VDragEvent drag) { VConsole.log("Drag over"); getLayout().deEmphasis();//from w ww . j a va2s . c o m getLayout().updateDragDetails(drag); getLayout().postOverHook(drag); // Validate the drop validate(new VAcceptCallback() { public void accepted(VDragEvent event) { getLayout().emphasis(event.getElementOver()); } }, drag); }
From source file:com.haulmont.cuba.web.widgets.client.addons.dragdroplayouts.ui.verticallayout.VDDVerticalLayoutDropHandler.java
License:Apache License
@Override public void dragOver(VDragEvent drag) { // Remove any emphasis getLayout().emphasis(null, null);/*from ww w.j av a2 s. c o m*/ // Update the dropdetails so we can validate the drop Slot slot = getSlot(drag.getElementOver(), drag.getCurrentGwtEvent()); if (slot != null) { getLayout().updateDragDetails(slot, drag); } else { getLayout().updateDragDetails(getLayout(), drag); } getLayout().postOverHook(drag); // Validate the drop validate(new VAcceptCallback() { public void accepted(VDragEvent event) { Slot slot = getSlot(event.getElementOver(), event.getCurrentGwtEvent()); if (slot != null) { getLayout().emphasis(slot, event); } else { getLayout().emphasis(getLayout(), event); } } }, drag); }