Examples of DragSourceAdapter


Examples of org.eclipse.swt.dnd.DragSourceAdapter

    // Drag source
    Transfer[] types = new Transfer[] { TextTransfer.getInstance() };
    DragSource source = new DragSource(treeViewer.getTree(), DND.DROP_COPY);
    source.setTransfer(types);   
       
    source.addDragListener(new DragSourceAdapter() {     
      public void dragSetData(DragSourceEvent event) {       
        event.data = ID;       
      }
      @SuppressWarnings("unchecked")
      public void dragStart(DragSourceEvent event) {       
View Full Code Here

Examples of org.eclipse.swt.dnd.DragSourceAdapter

    // Drag source
    Transfer[] types = new Transfer[] { TextTransfer.getInstance() };
    DragSource source = new DragSource(viewer.getTable(), DND.DROP_MOVE);
    source.setTransfer(types);   
       
    source.addDragListener(new DragSourceAdapter() {     
      public void dragSetData(DragSourceEvent event) {       
        event.data = PlaylistOverview.ID;       
      }
      public void dragStart(DragSourceEvent event) {         
        event.data = PlaylistOverview.ID;
View Full Code Here

Examples of org.eclipse.swt.dnd.DragSourceAdapter

  private void createDragSource() {
    Transfer[] types = new Transfer[] { TextTransfer.getInstance() };
    DragSource dragSource = new DragSource(tree, DND.DROP_COPY
        | DND.DROP_MOVE);
    dragSource.setTransfer(types);
    dragSource.addDragListener(new DragSourceAdapter() {

      @Override
      public void dragSetData(DragSourceEvent event) {
        List<MetaArtefactOperation> operations = new ArrayList<MetaArtefactOperation>();
        for (TreeItem item : tree.getSelection()) {
View Full Code Here

Examples of org.eclipse.swt.dnd.DragSourceAdapter

    // Install drag source
    final ISelectionProvider selectionProvider= viewer.getSelectionProvider();
    final DragSource source= new DragSource(st, DND.DROP_COPY | DND.DROP_MOVE);
    source.setTransfer(new Transfer[] {TextTransfer.getInstance()});
    source.addDragListener(new DragSourceAdapter() {
      String fSelectedText;
      Point fSelection;
      public void dragStart(DragSourceEvent event) {
        fTextDragAndDropToken= null;
        try {
View Full Code Here

Examples of org.eclipse.swt.dnd.DragSourceAdapter

  /**
   * Initializes drag and drop the template items
   */
  private void initializeDND() {
    DragSourceAdapter dragListener= new DragSourceAdapter() {
      /*
       * (non-Javadoc)
       *
       * @see org.eclipse.swt.dnd.DragSourceAdapter#dragStart(org.eclipse.swt.dnd.DragSourceEvent)
       */
 
View Full Code Here

Examples of org.eclipse.swt.dnd.DragSourceAdapter

          onRemove();
      }
    });

    /* Drag Support */
    fItemViewer.addDragSupport(DND.DROP_MOVE, new Transfer[] { LocalSelectionTransfer.getTransfer() }, new DragSourceAdapter() {
      @Override
      public void dragStart(final DragSourceEvent event) {
        SafeRunnable.run(new LoggingSafeRunnable() {
          public void run() throws Exception {
            IStructuredSelection selection = (IStructuredSelection) fItemViewer.getSelection();
View Full Code Here

Examples of org.eclipse.swt.dnd.DragSourceAdapter

        updateMoveEnablement();
      }
    });

    /* Drag Support */
    fViewer.addDragSupport(DND.DROP_MOVE, new Transfer[] { LocalSelectionTransfer.getTransfer() }, new DragSourceAdapter() {
      @Override
      public void dragStart(final DragSourceEvent event) {
        SafeRunnable.run(new LoggingSafeRunnable() {
          public void run() throws Exception {
            IStructuredSelection selection = (IStructuredSelection) fViewer.getSelection();
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.