Package org.eclipse.handly.ui.viewer
Class ViewerDragSupport
java.lang.Object
org.eclipse.handly.ui.viewer.ViewerDragSupport
Support for dragging items out of a structured viewer.
This class is a wrapper around
DelegatingDragAdapter
.-
Constructor Summary
ConstructorsConstructorDescriptionViewerDragSupport
(org.eclipse.jface.viewers.StructuredViewer viewer) Creates a drag support for the given viewer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDragSourceListener
(org.eclipse.jface.util.TransferDragSourceListener listener) Adds the givenTransferDragSourceListener
.protected int
Returns a bitwise OR of the supported drag and drop operation types.void
start()
Adds drag support to the viewer.
-
Constructor Details
-
ViewerDragSupport
public ViewerDragSupport(org.eclipse.jface.viewers.StructuredViewer viewer) Creates a drag support for the given viewer.- Parameters:
viewer
- notnull
-
-
Method Details
-
addDragSourceListener
public void addDragSourceListener(org.eclipse.jface.util.TransferDragSourceListener listener) Adds the givenTransferDragSourceListener
.- Parameters:
listener
- notnull
- 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
-