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 intgetDNDOperations()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.DragSourceListenergetDragListener(org.eclipse.jface.viewers.TreeViewer treeViewer)Returns theDragSourceListenerused to setup thedrag supportfor the viewer.intgetDragOperations()Returns the drag operations bits used to setup thedrag supportfor the viewer.org.eclipse.swt.dnd.Transfer[]getDragTransferTypes()Returns the drag transfer types used to setup thedrag supportfor the viewer.org.eclipse.swt.dnd.DropTargetListenergetDropListener(org.eclipse.emf.edit.domain.EditingDomain editingDomain, org.eclipse.jface.viewers.TreeViewer treeViewer)Returns theDragSourceListenerused to setup thedrop supportfor the viewer.intgetDropOperations()Returns the drag operations bits used to setup thedrop supportfor the viewer.org.eclipse.swt.dnd.Transfer[]getDropTransferTypes()Returns the drag transfer types used to setup thedrop supportfor the viewer.booleanhasDND()Whether DND support should be added to the tree.
-
-
-
Method Detail
-
getDragOperations
public int getDragOperations()
Description copied from interface:DNDProviderReturns the drag operations bits used to setup thedrag supportfor the viewer.- Specified by:
getDragOperationsin interfaceDNDProvider- Returns:
- the drag operations
-
getDragTransferTypes
public org.eclipse.swt.dnd.Transfer[] getDragTransferTypes()
Description copied from interface:DNDProviderReturns the drag transfer types used to setup thedrag supportfor the viewer.- Specified by:
getDragTransferTypesin interfaceDNDProvider- Returns:
- the drag
transfer types
-
getDragListener
public org.eclipse.swt.dnd.DragSourceListener getDragListener(org.eclipse.jface.viewers.TreeViewer treeViewer)
Description copied from interface:DNDProviderReturns theDragSourceListenerused to setup thedrag supportfor the viewer.- Specified by:
getDragListenerin interfaceDNDProvider- Parameters:
treeViewer- the treeviewer- Returns:
- the listener
-
getDropOperations
public int getDropOperations()
Description copied from interface:DNDProviderReturns the drag operations bits used to setup thedrop supportfor the viewer.- Specified by:
getDropOperationsin interfaceDNDProvider- Returns:
- the drop operations
-
getDropTransferTypes
public org.eclipse.swt.dnd.Transfer[] getDropTransferTypes()
Description copied from interface:DNDProviderReturns the drag transfer types used to setup thedrop supportfor the viewer.- Specified by:
getDropTransferTypesin 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:DNDProviderReturns theDragSourceListenerused to setup thedrop supportfor the viewer.- Specified by:
getDropListenerin 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:DNDProviderWhether DND support should be added to the tree.- Specified by:
hasDNDin interfaceDNDProvider- Returns:
trueif DND will be added, based on the other methods of this interface, orfalseif DND should not be added
-
-