Package org.eclipse.swt.dnd

Examples of org.eclipse.swt.dnd.DragSource.addDragListener()


    DragSource source = new DragSource(viewer.getTree(), DND.DROP_COPY);

    source.setTransfer(new Transfer[] { FeatureStructureTransfer.getInstance() });

    source.addDragListener(new DragSourceListener() {
      TreeItem dragSourceItem = null;

      public void dragStart(DragSourceEvent event) {

        event.doit = false;
View Full Code Here


        (ProjectionViewer) this.getSourceViewer(), SelectionCursorListener);
    IDragAndDropService dtSvc = (IDragAndDropService) getSite().getService(IDragAndDropService.class);
    dtSvc.addMergedDropTarget(tw, operations, transfers, ddListener);
    final DragSource source= new DragSource(tw, DND.DROP_COPY | DND.DROP_MOVE);
    source.setTransfer(new Transfer[] {TextTransfer.getInstance()});
    source.addDragListener(ddListener);     
  }
 
  /**
   * sets up seleciton listeners, like the TextSelection listener, and DND (eventually)
   *
 
View Full Code Here

      }

    });
    final DragSource dragSource = new DragSource(gallery, DND.DROP_COPY);
    dragSource.setTransfer(new Transfer[] { FileTransfer.getInstance() });
    dragSource.addDragListener(new DragSourceListener() {

      private String[] dataX;

      public void dragFinished(DragSourceEvent event) {
        this.dataX = null;
View Full Code Here

  public void addDragSupport(int operations, Transfer[] transferTypes, DragSourceListener listener) {

    Control myControl = getControl();
    final DragSource dragSource = new DragSource(myControl, operations);
    dragSource.setTransfer(transferTypes);
    dragSource.addDragListener(listener);
  }

  /**
   * Adds support for dropping items into this viewer via a user drag-and-drop
   * operation.
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.