Class DefaultDNDProvider
- java.lang.Object
-
- org.eclipse.emfforms.internal.swt.treemasterdetail.defaultprovider.DefaultDNDProvider
-
- All Implemented Interfaces:
DNDProvider
public class DefaultDNDProvider extends java.lang.Object implements DNDProvider
Default implementation of aDNDProvider
. This will support local transfers for copy, move and link operations in an EMF environment.- Author:
- Johannes Faltermeier
-
-
Constructor Summary
Constructors Constructor Description DefaultDNDProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
getDNDOperations()
The drag&drop operations which will be returned bygetDragOperations()
andgetDragOperations()
.protected org.eclipse.swt.dnd.Transfer[]
getDNDTransferTypes()
The transfers which will be returnedgetDragTransferTypes()
andgetDropTransferTypes()
.org.eclipse.swt.dnd.DragSourceListener
getDragListener(org.eclipse.jface.viewers.TreeViewer treeViewer)
Returns theDragSourceListener
used to setup thedrag support
for the viewer.int
getDragOperations()
Returns the drag operations bits used to setup thedrag support
for the viewer.org.eclipse.swt.dnd.Transfer[]
getDragTransferTypes()
Returns the drag transfer types used to setup thedrag support
for the viewer.org.eclipse.swt.dnd.DropTargetListener
getDropListener(org.eclipse.emf.edit.domain.EditingDomain editingDomain, org.eclipse.jface.viewers.TreeViewer treeViewer)
Returns theDragSourceListener
used to setup thedrop support
for the viewer.int
getDropOperations()
Returns the drag operations bits used to setup thedrop support
for the viewer.org.eclipse.swt.dnd.Transfer[]
getDropTransferTypes()
Returns the drag transfer types used to setup thedrop support
for the viewer.boolean
hasDND()
Whether DND support should be added to the tree.
-
-
-
Method Detail
-
getDragOperations
public int getDragOperations()
Description copied from interface:DNDProvider
Returns the drag operations bits used to setup thedrag support
for the viewer.- Specified by:
getDragOperations
in interfaceDNDProvider
- Returns:
- the drag operations
-
getDragTransferTypes
public org.eclipse.swt.dnd.Transfer[] getDragTransferTypes()
Description copied from interface:DNDProvider
Returns the drag transfer types used to setup thedrag support
for the viewer.- Specified by:
getDragTransferTypes
in interfaceDNDProvider
- Returns:
- the drag
transfer types
-
getDragListener
public org.eclipse.swt.dnd.DragSourceListener getDragListener(org.eclipse.jface.viewers.TreeViewer treeViewer)
Description copied from interface:DNDProvider
Returns theDragSourceListener
used to setup thedrag support
for the viewer.- Specified by:
getDragListener
in interfaceDNDProvider
- Parameters:
treeViewer
- the treeviewer- Returns:
- the listener
-
getDropOperations
public int getDropOperations()
Description copied from interface:DNDProvider
Returns the drag operations bits used to setup thedrop support
for the viewer.- Specified by:
getDropOperations
in interfaceDNDProvider
- Returns:
- the drop operations
-
getDropTransferTypes
public org.eclipse.swt.dnd.Transfer[] getDropTransferTypes()
Description copied from interface:DNDProvider
Returns the drag transfer types used to setup thedrop support
for the viewer.- Specified by:
getDropTransferTypes
in interfaceDNDProvider
- Returns:
- the drop
transfer types
-
getDropListener
public org.eclipse.swt.dnd.DropTargetListener getDropListener(org.eclipse.emf.edit.domain.EditingDomain editingDomain, org.eclipse.jface.viewers.TreeViewer treeViewer)
Description copied from interface:DNDProvider
Returns theDragSourceListener
used to setup thedrop support
for the viewer.- Specified by:
getDropListener
in interfaceDNDProvider
- Parameters:
editingDomain
- the editing domaintreeViewer
- the treeviewer- Returns:
- the listener
-
getDNDOperations
protected int getDNDOperations()
The drag&drop operations which will be returned bygetDragOperations()
andgetDragOperations()
.- Returns:
- the operation bits
-
getDNDTransferTypes
protected org.eclipse.swt.dnd.Transfer[] getDNDTransferTypes()
The transfers which will be returnedgetDragTransferTypes()
andgetDropTransferTypes()
.- Returns:
- the transfer types
-
hasDND
public boolean hasDND()
Description copied from interface:DNDProvider
Whether DND support should be added to the tree.- Specified by:
hasDND
in interfaceDNDProvider
- Returns:
true
if DND will be added, based on the other methods of this interface, orfalse
if DND should not be added
-
-