use of org.eclipse.swt.dnd.DropTarget in project cubrid-manager by CUBRID.
the class UnifyHostConfigDialogDNDController method registerDropTarget.
/**
* register drag source and DB tree target
*/
public void registerDropTarget() {
synchronized (this) {
DropTarget target = new DropTarget(dialog.getTableComposite(), DND.DROP_MOVE);
target.setTransfer(new Transfer[] { TextTransfer.getInstance() });
target.addDropListener(new DropTargetAdapter() {
/**
* @see org.eclipse.swt.dnd.DropTargetAdapter#drop(org.eclipse.swt.dnd.DropTargetEvent)
* @param event the information associated with the drop event
*/
public void drop(DropTargetEvent event) {
addHost();
}
});
}
}
use of org.eclipse.swt.dnd.DropTarget in project tdi-studio-se by Talend.
the class Schema2XMLDragAndDropHandler 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);
}
use of org.eclipse.swt.dnd.DropTarget in project tdi-studio-se by Talend.
the class DragNDrop method createDropTarget.
/**
*
* create DropTarget.
*/
private void createDropTarget(DropTargetListener targetListener) {
if (dropTarget != null) {
dropTarget.dispose();
}
dropTarget = new DropTarget(draggableTable, DND.DROP_DEFAULT | DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
dropTarget.setTransfer(new Transfer[] { TableEntriesTransfer.getInstance() });
dropTarget.addDropListener(targetListener);
}
use of org.eclipse.swt.dnd.DropTarget in project tdi-studio-se by Talend.
the class DropTargetOperationListener method addControl.
/**
* DOC amaumont Comment method "addControl".
*
* @param outputTablesZoneView
*/
public void addControl(Control control) {
DropTarget dropTarget = new DropTarget(control, authorizedOperations);
dropTarget.setTransfer(authorizedTransfers);
dropTarget.addDropListener(dropTargetListener);
}
use of org.eclipse.swt.dnd.DropTarget 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);
}
Aggregations