Package org.eclipse.handly.ui.viewer
Class ViewerDragSupport
- java.lang.Object
-
- org.eclipse.handly.ui.viewer.ViewerDragSupport
-
public class ViewerDragSupport extends java.lang.ObjectSupport for dragging items out of a structured viewer. This class is a wrapper aroundDelegatingDragAdapter.
-
-
Constructor Summary
Constructors Constructor Description ViewerDragSupport(org.eclipse.jface.viewers.StructuredViewer viewer)Creates a drag support for the given viewer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDragSourceListener(org.eclipse.jface.util.TransferDragSourceListener listener)Adds the givenTransferDragSourceListener.protected intgetOperations()Returns a bitwise OR of the supported drag and drop operation types.voidstart()Adds drag support to the viewer.
-
-
-
Method Detail
-
addDragSourceListener
public void addDragSourceListener(org.eclipse.jface.util.TransferDragSourceListener listener)
Adds the givenTransferDragSourceListener.- Parameters:
listener- notnull- Throws:
java.lang.IllegalStateException- if already started
-
start
public void start()
Adds drag support to the viewer.- Throws:
java.lang.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
-
-