java.lang.Object
org.eclipse.swt.dnd.DropTargetAdapter
org.eclipse.jface.viewers.ViewerDropAdapter
org.eclipse.ui.part.PluginDropAdapter
- All Implemented Interfaces:
- org.eclipse.swt.dnd.DropTargetListener, java.util.EventListener, org.eclipse.swt.internal.SWTEventListener
- public class PluginDropAdapter
- extends org.eclipse.jface.viewers.ViewerDropAdapter
Adapter for adding handling of the PluginTransfer drag and drop
transfer type to a drop action.
This class may be instantiated or subclassed.
| Methods inherited from class org.eclipse.jface.viewers.ViewerDropAdapter |
determineLocation, determineTarget, dragEnter, dragOperationChanged, dragOver, dropAccept, getBounds, getCurrentLocation, getCurrentOperation, getCurrentTarget, getFeedbackEnabled, getSelectedObject, getViewer, handleException, setFeedbackEnabled, setScrollExpandEnabled |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ATT_CLASS
public static final java.lang.String ATT_CLASS
- The extension point attribute that defines the drop action class.
- See Also:
- Constant Field Values
currentTransfer
private org.eclipse.swt.dnd.TransferData currentTransfer
- The current transfer data, or
null if none.
PluginDropAdapter
public PluginDropAdapter(org.eclipse.jface.viewers.StructuredViewer viewer)
- Creates a plug-in drop adapter for the given viewer.
drop
public void drop(org.eclipse.swt.dnd.DropTargetEvent event)
- Description copied from class:
org.eclipse.swt.dnd.DropTargetAdapter
- This implementation of
drop does nothing.
For additional information see DropTargetListener.drop.
getCurrentTransfer
protected org.eclipse.swt.dnd.TransferData getCurrentTransfer()
- Returns the current transfer.
getPluginAdapter
protected static IDropActionDelegate getPluginAdapter(PluginTransferData data)
throws org.eclipse.core.runtime.CoreException
- Loads the class that will perform the action associated with the given drop
data.
performDrop
public boolean performDrop(java.lang.Object data)
- Description copied from class:
org.eclipse.jface.viewers.ViewerDropAdapter
- Performs any work associated with the drop.
Subclasses must implement this method to provide drop behavior.
validateDrop
public boolean validateDrop(java.lang.Object target,
int operation,
org.eclipse.swt.dnd.TransferData transferType)
- The
PluginDropAdapter implementation of this
ViewerDropAdapter method is used to notify the action that some
aspect of the drop operation has changed. Subclasses may override.