org.eclipse.cdt.internal.ui.dnd
Class FileTransferDropAdapter
java.lang.Object
org.eclipse.cdt.internal.ui.dnd.CDTViewerDropAdapter
org.eclipse.cdt.internal.ui.dnd.FileTransferDropAdapter
- All Implemented Interfaces:
- java.util.EventListener, TransferDropTargetListener, org.eclipse.swt.dnd.DropTargetListener, org.eclipse.swt.internal.SWTEventListener
public class FileTransferDropAdapter
- extends CDTViewerDropAdapter
- implements TransferDropTargetListener
FileTransferDropAdapter
Method Summary |
void |
drop(java.lang.Object dropTarget,
org.eclipse.swt.dnd.DropTargetEvent event)
The actual drop has occurred. |
org.eclipse.swt.dnd.Transfer |
getTransfer()
Returns the transfer used by this drop target. |
boolean |
isEnabled(org.eclipse.swt.dnd.DropTargetEvent event)
Returns whether the listener is able to handle the given
drop traget event. |
void |
validateDrop(java.lang.Object target,
org.eclipse.swt.dnd.DropTargetEvent event,
int operation)
Checks if the drop on the current target is valid. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.swt.dnd.DropTargetListener |
dragEnter, dragLeave, dragOperationChanged, dragOver, drop, dropAccept |
FileTransferDropAdapter
public FileTransferDropAdapter(org.eclipse.jface.viewers.AbstractTreeViewer viewer)
getTransfer
public org.eclipse.swt.dnd.Transfer getTransfer()
- Description copied from interface:
TransferDropTargetListener
- Returns the transfer used by this drop target.
- Specified by:
getTransfer
in interface TransferDropTargetListener
isEnabled
public boolean isEnabled(org.eclipse.swt.dnd.DropTargetEvent event)
- Description copied from interface:
TransferDropTargetListener
- Returns whether the listener is able to handle the given
drop traget event.
- Specified by:
isEnabled
in interface TransferDropTargetListener
- Parameters:
event
- the drop target event
- Returns:
true
if the listener can handle the event;
otherwise false
validateDrop
public void validateDrop(java.lang.Object target,
org.eclipse.swt.dnd.DropTargetEvent event,
int operation)
- Description copied from class:
CDTViewerDropAdapter
- Checks if the drop on the current target is valid. The method
can alter the
currentDataType
field and the
detail
field to give feedback about drop acceptence.
- Overrides:
validateDrop
in class CDTViewerDropAdapter
- Parameters:
target
- the drop target in form of a domain element.event
- the drop traget eventoperation
- the operation requested by the user.
drop
public void drop(java.lang.Object dropTarget,
org.eclipse.swt.dnd.DropTargetEvent event)
- Description copied from class:
CDTViewerDropAdapter
- The actual drop has occurred.
- Overrides:
drop
in class CDTViewerDropAdapter
- Parameters:
dropTarget
- the drop target in form of a domain element.event
- the drop traget event