Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.ui.part
Class PluginDropAdapter  view PluginDropAdapter download PluginDropAdapter.java

java.lang.Object
  extended byorg.eclipse.swt.dnd.DropTargetAdapter
      extended byorg.eclipse.jface.viewers.ViewerDropAdapter
          extended byorg.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.


Field Summary
static java.lang.String ATT_CLASS
          The extension point attribute that defines the drop action class.
private  org.eclipse.swt.dnd.TransferData currentTransfer
          The current transfer data, or null if none.
 
Fields inherited from class org.eclipse.jface.viewers.ViewerDropAdapter
LOCATION_AFTER, LOCATION_BEFORE, LOCATION_NONE, LOCATION_ON
 
Constructor Summary
PluginDropAdapter(org.eclipse.jface.viewers.StructuredViewer viewer)
          Creates a plug-in drop adapter for the given viewer.
 
Method Summary
 void drop(org.eclipse.swt.dnd.DropTargetEvent event)
          This implementation of drop does nothing.
protected  org.eclipse.swt.dnd.TransferData getCurrentTransfer()
          Returns the current transfer.
protected static IDropActionDelegate getPluginAdapter(PluginTransferData data)
          Loads the class that will perform the action associated with the given drop data.
 boolean performDrop(java.lang.Object data)
          Performs any work associated with the drop.
 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.
 
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 org.eclipse.swt.dnd.DropTargetAdapter
dragLeave
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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.

Constructor Detail

PluginDropAdapter

public PluginDropAdapter(org.eclipse.jface.viewers.StructuredViewer viewer)
Creates a plug-in drop adapter for the given viewer.

Method Detail

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.