DefaultDragDropDriver Class

com.bea.ide.core.datatransfer
DefaultDragDropDriver Class

public class DefaultDragDropDriver

    extends Object
    implements IDragDropDriver

Hierarchy
Object
  DefaultDragDropDriver
All Implemented Interfaces

IDragDropDriver
Direct Known Subclasses

SourceViewDragDropDriver

Nested Class Summary

public static classDefaultDragDropDriver.DragSourceInfo

Constructor Summary

DefaultDragDropDriver()

 

Method Summary

public void
dragComplete(Transferable t, boolean success, int action, Component c)
Called on the source of a drag and drop when the drag operation is completed.
public void
dragExit(Component c)
Called on the drop target when a drag and drop operation is cancelled because the cursor has left the component.
public int
dragOver(IDragDropContext dc)
Called during drag and drop to update the visual feedback for the drag operation The transfer driver should use available information to determine whether a drop is possible, and if so, what action it would be.
public boolean
drop(IDragDropContext dc)
Causes a transfer to the component of a Transferable.
public IDragDropDriver.IDragSourceInfo
getDragInfo(Component c, Point pt)
Creates a Transferable to use as the source for a drag and drop operation.
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface com.bea.ide.core.datatransfer.IDragDropDriver
dragComplete, dragExit, dragOver, drop, getDragInfo
 

Constructor Detail

DefaultDragDropDriver

public DefaultDragDropDriver()
 

Method Detail

dragComplete(Transferable, boolean, int, Component) Method

public void dragComplete(Transferable t, 
                         boolean success, 
                         int action, 
                         Component c)
Description copied from IDragDropDriver.dragComplete(Transferable, boolean, int, Component)
Called on the source of a drag and drop when the drag operation is completed. This should be used to handle any results based on the type of action, or cleanup any visual changes due to the start of a drag and drop.

Parameters

t
Transferable that was used in the transfer
success
Boolean value indicating whether or not the drop completed successfully
action
DnDConstants integer value indicating the type of action the drop represented
c
Component that was the source of the drag and drop

dragExit(Component) Method

public void dragExit(Component c)
Description copied from IDragDropDriver.dragExit(Component)
Called on the drop target when a drag and drop operation is cancelled because the cursor has left the component. This may be used to clean up any visual state created during drag()

Parameters

c
the component for which the drag is cancelled

dragOver(IDragDropContext) Method

public int dragOver(IDragDropContext dc)
Description copied from IDragDropDriver.dragOver(IDragDropContext)
Called during drag and drop to update the visual feedback for the drag operation The transfer driver should use available information to determine whether a drop is possible, and if so, what action it would be.

Parameters

dc
the drag context object to use in determining the action for a drop

Returns

DnDConstants.ACTION_NONE if a drop cannot be done at the current location otherwise, the action that will be performed given a drop at the current location

drop(IDragDropContext) Method

public boolean drop(IDragDropContext dc)
Description copied from IDragDropDriver.drop(IDragDropContext)
Causes a transfer to the component of a Transferable.

Parameters

dc
the drop context object to use in determining the information for the drop

Returns

true if the transfer completes successfully, false otherwise

getDragInfo(Component, Point) Method

public IDragDropDriver.IDragSourceInfo getDragInfo(Component c, 
                                                   Point pt)
Description copied from IDragDropDriver.getDragInfo(Component, Point)
Creates a Transferable to use as the source for a drag and drop operation. Returns the representation of the data to be transferred.

Parameters

c
Component where the drag is starting
pt
Point representing the start of the drag

Returns

interface to a drag source information object or null if drag is not valid