Search in sources :

Example 1 with CellDetails

use of com.haulmont.cuba.web.widgets.client.addons.dragdroplayouts.ui.gridlayout.VDDGridLayout.CellDetails in project cuba by cuba-platform.

the class VDDGridLayoutDropHandler method dragOver.

@Override
public void dragOver(VDragEvent drag) {
    // Remove emphasis from previous selection
    getLayout().deEmphasis();
    // 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);
}
Also used : VDragEvent(com.vaadin.client.ui.dd.VDragEvent) CellDetails(com.haulmont.cuba.web.widgets.client.addons.dragdroplayouts.ui.gridlayout.VDDGridLayout.CellDetails) VAcceptCallback(com.vaadin.client.ui.dd.VAcceptCallback)

Aggregations

CellDetails (com.haulmont.cuba.web.widgets.client.addons.dragdroplayouts.ui.gridlayout.VDDGridLayout.CellDetails)1 VAcceptCallback (com.vaadin.client.ui.dd.VAcceptCallback)1 VDragEvent (com.vaadin.client.ui.dd.VDragEvent)1