Class ViewerDragSupport

java.lang.Object
org.eclipse.handly.ui.viewer.ViewerDragSupport

public class ViewerDragSupport extends Object
Support for dragging items out of a structured viewer. This class is a wrapper around DelegatingDragAdapter.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ViewerDragSupport(org.eclipse.jface.viewers.StructuredViewer viewer)
    Creates a drag support for the given viewer.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addDragSourceListener(org.eclipse.jface.util.TransferDragSourceListener listener)
    Adds the given TransferDragSourceListener.
    protected int
    Returns a bitwise OR of the supported drag and drop operation types.
    void
    Adds drag support to the viewer.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ViewerDragSupport

      public ViewerDragSupport(org.eclipse.jface.viewers.StructuredViewer viewer)
      Creates a drag support for the given viewer.
      Parameters:
      viewer - not null
  • Method Details

    • addDragSourceListener

      public void addDragSourceListener(org.eclipse.jface.util.TransferDragSourceListener listener)
      Adds the given TransferDragSourceListener.
      Parameters:
      listener - not null
      Throws:
      IllegalStateException - if already started
    • start

      public void start()
      Adds drag support to the viewer.
      Throws:
      IllegalStateException - if already started
      See Also:
      • StructuredViewer.addDragSupport(int, org.eclipse.swt.dnd.Transfer[], org.eclipse.swt.dnd.DragSourceListener)
    • getOperations

      protected int getOperations()
      Returns a bitwise OR of the supported drag and drop operation types.

      Default implementation returns DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK.

      Returns:
      a bitwise OR of the supported drag and drop operation types