Search in sources :

Example 1 with DnDLabel

use of org.activityinfo.ui.client.component.formdesigner.palette.DnDLabel in project activityinfo by bedatadriven.

the class DragMonitor method dragEnd.

public void dragEnd() {
    try {
        if (!widgetAdded && dragContext != null && dragContext.draggable instanceof DnDLabel) {
            DropControllerExtended dropController = formDesigner.getDropControllerRegistry().getRootDropController();
            // force to create positioner
            dropController.onEnter(dragContext);
            // set it to end
            dropController.setPositionerToEnd();
            // drop
            dropController.onPreviewDrop(dragContext);
        }
    } catch (VetoDragException e) {
    // do nothing
    } finally {
        reset();
    }
}
Also used : VetoDragException(com.allen_sauer.gwt.dnd.client.VetoDragException) DnDLabel(org.activityinfo.ui.client.component.formdesigner.palette.DnDLabel) DropControllerExtended(org.activityinfo.ui.client.component.formdesigner.drop.DropControllerExtended)

Aggregations

VetoDragException (com.allen_sauer.gwt.dnd.client.VetoDragException)1 DropControllerExtended (org.activityinfo.ui.client.component.formdesigner.drop.DropControllerExtended)1 DnDLabel (org.activityinfo.ui.client.component.formdesigner.palette.DnDLabel)1