Java 类org.eclipse.swt.dnd.DropTargetListener 实例源码

项目:neoscada    文件:ChartManager.java   
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;
}
项目:tlaplus    文件:ApplicationWorkbenchWindowAdvisor.java   
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);
}
项目:statecharts    文件:ExampleDropTargetInstaller.java   
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);
        }
    }
}
项目:idecore    文件:ForceIdeUrlDropHandler.java   
private 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);
        }
    }
}
项目:statecharts    文件:ExampleDropTargetInstaller.java   
protected void registerDropListener(DropTarget target, DropTargetListener dropListener) {
    target.removeDropListener(dropListener);
    target.addDropListener(dropListener);
}
项目:Eclipse-Postfix-Code-Completion    文件:PackageViewerWrapper.java   
@Override
public void addDropSupport(int operations, Transfer[] transferTypes, DropTargetListener listener) {
    fViewer.addDropSupport(operations, transferTypes, listener);
}
项目:idecore    文件:ForceIdeUrlDropHandler.java   
private void registerDropListener(DropTarget target, DropTargetListener dropListener) {
    target.removeDropListener(dropListener);
    target.addDropListener(dropListener);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:PackageViewerWrapper.java   
@Override
public void addDropSupport(int operations, Transfer[] transferTypes, DropTargetListener listener) {
    fViewer.addDropSupport(operations, transferTypes, listener);
}
项目:gef-gwt    文件:StructuredViewer.java   
/**
 * Adds support for dropping items into this viewer via a user drag-and-drop
 * operation.
 * 
 * @param operations
 *            a bitwise OR of the supported drag and drop operation types (
 *            <code>DROP_COPY</code>,<code>DROP_LINK</code>, and
 *            <code>DROP_MOVE</code>)
 * @param transferTypes
 *            the transfer types that are supported by the drop operation
 * @param listener
 *            the callback that will be invoked after the drag and drop
 *            operation finishes
 * @see org.eclipse.swt.dnd.DND
 */
public void addDropSupport(int operations, Transfer[] transferTypes,
        final DropTargetListener listener) {
    Control control = getControl();
    DropTarget dropTarget = new DropTarget(control, operations);
    dropTarget.setTransfer(transferTypes);
    dropTarget.addDropListener(listener);
}