Package com.iizigo.dnd
Class DndHelper
java.lang.Object
com.iizigo.dnd.DndHelper
The drag-drop helper for properties and tree/table viewers.
- Author:
- Christopher Mindus
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- static ITreeContentProviderCreates a common navigator content provider.Creates the common label provider.- static IContainer- getActualTarget- (IResource mouseTarget) Returns the actual target of the drop, given the resource under the mouse.- static ViewerGets a Viewer from a Control.- static void- register- (int dragOperations, int dropOperations, StructuredViewer viewer) Registers the TreeViewer or TableViewer control.- static voidRegisters the Viewer for Drag-and-Drop.- static voidSaves the content service from the common navigator.
- Constructor Details- DndHelperpublic DndHelper()
 
- Method Details- registerRegisters the Viewer for Drag-and-Drop.
- getViewerGets a Viewer from a Control.- Parameters:
- control- control.
- Returns:
- The viewer for the control or null for none.
 
- registerRegisters the TreeViewer or TableViewer control.- Parameters:
- dragOperations- The supported drag operations.
- dropOperations- The supported drop operations.
- viewer- The TreeViewer or TableViewer, if wrong class, an assert exception is thrown.
 
- getActualTargetReturns the actual target of the drop, given the resource under the mouse. If the mouse target is a file, then the drop actually occurs in its parent. If the drop location is before or after the mouse target and feedback is enabled, the target is also the parent.
- createCommonContentProviderCreates a common navigator content provider.
- createCommonLabelProviderCreates the common label provider.