org.eclipse.swt.dnd.DropTargetListener Java Examples
The following examples show how to use
org.eclipse.swt.dnd.DropTargetListener.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ChartManager.java From neoscada with Eclipse Public License 1.0 | 5 votes |
public DropTarget createDropTarget ( final Transfer[] transfers, final DropTargetListener dropTargetListener ) { checkWidget (); final DropTarget target = new DropTarget ( this.chartArea, DND.DROP_DEFAULT | DND.DROP_COPY | DND.DROP_LINK ); target.setTransfer ( transfers ); target.addDropListener ( dropTargetListener ); return target; }
Example #2
Source File: ApplicationWorkbenchWindowAdvisor.java From tlaplus with MIT License | 5 votes |
public void preWindowOpen() { IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); configurer.setInitialSize(new Point(800, 600)); configurer.setShowFastViewBars(true); configurer.setShowStatusLine(true); configurer.setShowProgressIndicator(true); configurer.setShowCoolBar(false); // A DropTargetAdapter is need for editor DND support final DropTargetListener dtl = new EditorAreaDropAdapter( configurer.getWindow()); configurer.configureEditorAreaDropListener(dtl); }
Example #3
Source File: ExampleDropTargetInstaller.java From statecharts with Eclipse Public License 1.0 | 5 votes |
protected void hookRecursive(Control child, DropTargetListener dropListener) { DropTarget childTarget = findDropTarget(child); if (childTarget != null) { registerWithExistingTarget(childTarget); registerDropListener(childTarget, dropListener); } if (child instanceof Composite) { Composite composite = (Composite) child; Control[] children = composite.getChildren(); for (Control control : children) { hookRecursive(control, dropListener); } } }
Example #4
Source File: ExampleDropTargetInstaller.java From statecharts with Eclipse Public License 1.0 | 4 votes |
protected void registerDropListener(DropTarget target, DropTargetListener dropListener) { target.removeDropListener(dropListener); target.addDropListener(dropListener); }
Example #5
Source File: PackageViewerWrapper.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
@Override public void addDropSupport(int operations, Transfer[] transferTypes, DropTargetListener listener) { fViewer.addDropSupport(operations, transferTypes, listener); }