Search in sources :

Example 1 with VpeDnDEvent

use of org.jboss.tools.common.model.ui.dnd.VpeDnDEvent in project jbosstools-base by jbosstools.

the class DropContext method setDropTargetEvent.

public void setDropTargetEvent(TypedEvent event) {
    this.event = event;
    TransferData[] ds = null;
    if (this.event instanceof DropTargetEvent) {
        ds = ((DropTargetEvent) event).dataTypes;
    } else if (this.event instanceof VpeDnDEvent) {
        ds = ((VpeDnDEvent) this.event).getDataTypes();
    }
    if (ds != null) {
        for (int i = 0; i < TRANSFERS.length; i++) {
            TransferData data = TRANSFERS[i].getSupportedData(ds);
            if (data != null) {
                TRANSFERS[i].process(data);
                break;
            }
        }
    }
}
Also used : VpeDnDEvent(org.jboss.tools.common.model.ui.dnd.VpeDnDEvent) TransferData(org.eclipse.swt.dnd.TransferData) DropTargetEvent(org.eclipse.swt.dnd.DropTargetEvent)

Aggregations

DropTargetEvent (org.eclipse.swt.dnd.DropTargetEvent)1 TransferData (org.eclipse.swt.dnd.TransferData)1 VpeDnDEvent (org.jboss.tools.common.model.ui.dnd.VpeDnDEvent)1