|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.refractions.udig.ui.UDIGDragDropUtilities
public class UDIGDragDropUtilities
Useful methods for adding drag and drop support to controls or viewers. It hooks up the control with the udig drag and drop framework.
Nested Class Summary | |
---|---|
static class |
UDIGDragDropUtilities.DragSourceDescriptor
|
static class |
UDIGDragDropUtilities.DropTargetDescriptor
|
Constructor Summary | |
---|---|
UDIGDragDropUtilities()
|
Method Summary | |
---|---|
static void |
addDragDropSupport(Control control,
IDropTargetProvider destination,
ISelectionProvider source)
Adds both drag and drop support to the StructuredViewer. |
static void |
addDragDropSupport(StructuredViewer viewer,
IDropTargetProvider defaultTarget)
Adds both drag and drop support to the StructuredViewer. |
static void |
addDragDropSupport(StructuredViewer viewer,
IDropTargetProvider defaultTarget,
boolean showDropFeedback,
boolean expandTree)
Adds both drag and drop support to the StructuredViewer. |
static UDIGDragDropUtilities.DragSourceDescriptor |
addDragSupport(Control control,
ISelectionProvider provider)
Adds drag support to the StructuredViewer. |
static UDIGDropTargetListener |
addDropSupport(StructuredViewer viewer,
IDropTargetProvider defaultTarget)
Adds drop support to the StructuredViewer. |
static UDIGDropTargetListener |
addDropSupport(StructuredViewer viewer,
IDropTargetProvider defaultTarget,
boolean showDropFeedback,
boolean scrollExpandEnabled)
Adds drop support to the StructuredViewer. |
static UDIGControlDropListener |
getEditorDropListener()
Creates a drop listener that will send the drop event to the currently active editor. |
static java.util.Set<Transfer> |
getTransfers()
Returns the transfers that are available with the current udig configuration. |
static void |
registerUDigDND(IWorkbenchWindowConfigurer configurer)
Registers the DND Support needed by uDig. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UDIGDragDropUtilities()
Method Detail |
---|
public static void addDragDropSupport(StructuredViewer viewer, IDropTargetProvider defaultTarget)
For this to work the destination object must have a dropAction extension defined for it.
Feedback is enabled but scroll and expand is not.
viewer
- the viewer to have drag and drop support added to it.defaultTarget
- The target to use if the mouse is not over an item in the viewerpublic static void addDragDropSupport(StructuredViewer viewer, IDropTargetProvider defaultTarget, boolean showDropFeedback, boolean expandTree)
For this to work the destination object must have a dropAction extension defined for it.
viewer
- the viewer to have drag and drop support added to it.defaultTarget
- The target to use if the mouse is not over an item in the viewerpublic static UDIGDropTargetListener addDropSupport(StructuredViewer viewer, IDropTargetProvider defaultTarget)
For this to work the destination object must have a dropAction extension defined for it.
Feedback is enabled but scroll and expand is not.
viewer
- the viewer to have drop support added to it.destination
- The target to use if the mouse is not over an item in the viewerpublic static UDIGDropTargetListener addDropSupport(StructuredViewer viewer, IDropTargetProvider defaultTarget, boolean showDropFeedback, boolean scrollExpandEnabled)
For this to work the destination object must have a dropAction extension defined for it.
viewer
- the viewer to have drop support added to it.destination
- The target to use if the mouse is not over an item in the viewershowDropFeedback
- if true the feedback bars will be shown in the viewer.scrollExpandEnabled
- if true trees will be expanded and the viewer will be scrolled.public static void addDragDropSupport(Control control, IDropTargetProvider destination, ISelectionProvider source)
For this to work the destination object must have a dropAction extension defined for it.
control
- the viewer to have drag and drop support added to it.destination
- the destination that determines what actions will take
place when a drag or drop event occurs.public static UDIGDragDropUtilities.DragSourceDescriptor addDragSupport(Control control, ISelectionProvider provider)
For this to work the destination object must have a dropAction extension defined for it.
control
- the viewer to have drag support added to it.destination
- the destination that determines what actions will take
place when a drag event occurs.
public static java.util.Set<Transfer> getTransfers()
public static void registerUDigDND(IWorkbenchWindowConfigurer configurer)
configurer
- The IWorkbenchWindowConfigurer for the workbenchpublic static UDIGControlDropListener getEditorDropListener()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |