Search in sources :

Example 6 with DropTargetListener

use of org.eclipse.swt.dnd.DropTargetListener in project tdi-studio-se by Talend.

the class SchemaXMLDragAndDropHandler method createDropTarget.

/**
     * 
     * create DropTarget.
     */
private void createDropTarget() {
    if (loopDropTarget != null) {
        loopDropTarget.dispose();
    }
    loopDropTarget = new DropTarget(linker.getTarget(), DND.DROP_DEFAULT | DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
    loopDropTarget.setTransfer(new Transfer[] { LocalDataTransfer.getInstance() });
    DropTargetListener targetListener = new TableDropTargetListener();
    loopDropTarget.addDropListener(targetListener);
}
Also used : TransferDropTargetListener(org.eclipse.jface.util.TransferDropTargetListener) DropTargetListener(org.eclipse.swt.dnd.DropTargetListener) DropTarget(org.eclipse.swt.dnd.DropTarget)

Example 7 with DropTargetListener

use of org.eclipse.swt.dnd.DropTargetListener in project tdi-studio-se by Talend.

the class JSONToSchemaDragAndDropHandler method createDropTarget.

/**
     * 
     * create DropTarget.
     */
private void createDropTarget() {
    if (loopDropTarget != null) {
        loopDropTarget.dispose();
    }
    loopDropTarget = new DropTarget(loopTable, DND.DROP_DEFAULT | DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
    loopDropTarget.setTransfer(new Transfer[] { XPathTransfer.getInstance() });
    DropTargetListener targetListener = new TableDropTargetListener();
    loopDropTarget.addDropListener(targetListener);
    if (fieldsDropTarget != null) {
        fieldsDropTarget.dispose();
    }
    fieldsDropTarget = new DropTarget(fieldsTable, DND.DROP_DEFAULT | DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
    fieldsDropTarget.setTransfer(new Transfer[] { XPathTransfer.getInstance() });
    targetListener = new TableDropTargetListener();
    fieldsDropTarget.addDropListener(targetListener);
}
Also used : TransferDropTargetListener(org.eclipse.jface.util.TransferDropTargetListener) DropTargetListener(org.eclipse.swt.dnd.DropTargetListener) DropTarget(org.eclipse.swt.dnd.DropTarget)

Example 8 with DropTargetListener

use of org.eclipse.swt.dnd.DropTargetListener in project tdi-studio-se by Talend.

the class JSONTree2SchemaDragAndDropHandler method createDropTarget.

private void createDropTarget() {
    if (loopDropTarget != null) {
        loopDropTarget.dispose();
    }
    loopDropTarget = new DropTarget(table, DND.DROP_DEFAULT | DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
    loopDropTarget.setTransfer(new Transfer[] { XPathTransfer.getInstance() });
    DropTargetListener targetListener = new TableDropTargetListener();
    loopDropTarget.addDropListener(targetListener);
}
Also used : TransferDropTargetListener(org.eclipse.jface.util.TransferDropTargetListener) DropTargetListener(org.eclipse.swt.dnd.DropTargetListener) DropTarget(org.eclipse.swt.dnd.DropTarget)

Aggregations

DropTarget (org.eclipse.swt.dnd.DropTarget)8 DropTargetListener (org.eclipse.swt.dnd.DropTargetListener)8 TransferDropTargetListener (org.eclipse.jface.util.TransferDropTargetListener)6 DropTargetEvent (org.eclipse.swt.dnd.DropTargetEvent)2 TextTransfer (org.eclipse.swt.dnd.TextTransfer)2 Transfer (org.eclipse.swt.dnd.Transfer)2 IColumn (de.jaret.util.ui.table.model.IColumn)1 IRow (de.jaret.util.ui.table.model.IRow)1 ITableNode (de.jaret.util.ui.table.model.ITableNode)1 Command (org.eclipse.gef.commands.Command)1 StyledText (org.eclipse.swt.custom.StyledText)1 DragSource (org.eclipse.swt.dnd.DragSource)1 DragSourceEvent (org.eclipse.swt.dnd.DragSourceEvent)1 DragSourceListener (org.eclipse.swt.dnd.DragSourceListener)1 DisposeEvent (org.eclipse.swt.events.DisposeEvent)1 DisposeListener (org.eclipse.swt.events.DisposeListener)1 Text (org.eclipse.swt.widgets.Text)1 IElementParameter (org.talend.core.model.process.IElementParameter)1 PropertyChangeCommand (org.talend.designer.core.ui.editor.cmd.PropertyChangeCommand)1 ReconcilerStyledText (org.talend.designer.core.ui.viewer.ReconcilerStyledText)1