Java Platform 1.2
Beta 4

Class java.awt.dnd.DropTargetDropEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--java.awt.dnd.DropTargetEvent
              |
              +--java.awt.dnd.DropTargetDropEvent

public class DropTargetDropEvent
extends DropTargetEvent

The DropTargetDropEvent is delivered via the DropTargetListener drop() method.

Since:
JDK1.2
See Also:
Serialized Form

Fields inherited from class java.awt.dnd.DropTargetEvent
context
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DropTargetDropEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions, boolean isLocal)
          Construct a DropTargetEvent
DropTargetDropEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions)
          construct an Event
 
Method Summary
 void acceptDrop(int dropAction)
          accept the Drop, using the specified action.
 void dropComplete(boolean success)
          notify the DragSource that the drop transfer(s) are completed
 DataFlavor[] getCurrentDataFlavors()
           
 List getCurrentDataFlavorsAsList()
           
 int getDropAction()
           
 Point getLocation()
           
 int getSourceActions()
           
 Transferable getTransferable()
           
 boolean isDataFlavorSupported(DataFlavor df)
           
 boolean isLocalTransfer()
           
 void rejectDrop()
          reject the Drop.
 
Methods inherited from class java.awt.dnd.DropTargetEvent
getDropTargetContext
 
Methods inherited from class java.util.EventObject
getSource , toString
 
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait
 

Constructor Detail

DropTargetDropEvent

public DropTargetDropEvent(DropTargetContext dtc,
                           Point cursorLocn,
                           int dropAction,
                           int srcActions)
construct an Event
Parameters:
dtc - The DropTargetContext for this operation
cursorLocn - The location of the "Drag" Cursors hotspot in Component coordinates
dropAction - The currently selected user drop action
srcActions - The current set of actions supported by the source

DropTargetDropEvent

public DropTargetDropEvent(DropTargetContext dtc,
                           Point cursorLocn,
                           int dropAction,
                           int srcActions,
                           boolean isLocal)
Construct a DropTargetEvent
Parameters:
dtc - The DropTargetContext for this operation
cursorLocn - The location of the "Drag" Cursors hotspot in Component coordinates
dropAction - The currently selected user drop action
srcActions - The current set of actions supported by the source
isLocalTx - True iff the source is in the same JVM as the target
Method Detail

getLocation

public Point getLocation()
Returns:
the current cursor location in Component's coords.

getCurrentDataFlavors

public DataFlavor[] getCurrentDataFlavors()
Returns:
current DataFlavors

getCurrentDataFlavorsAsList

public List getCurrentDataFlavorsAsList()
Returns:
the currently available DataFlavors as a java.util.List

isDataFlavorSupported

public boolean isDataFlavorSupported(DataFlavor df)
Returns:
if the DataFlavor specified is available from the source

getSourceActions

public int getSourceActions()
Returns:
source actions

getDropAction

public int getDropAction()
Returns:
source actions

getTransferable

public Transferable getTransferable()
Returns:
the Transferable associated with the drop

acceptDrop

public void acceptDrop(int dropAction)
accept the Drop, using the specified action.

rejectDrop

public void rejectDrop()
reject the Drop.

dropComplete

public void dropComplete(boolean success)
notify the DragSource that the drop transfer(s) are completed

isLocalTransfer

public boolean isLocalTransfer()
Returns:
if the Source is in the same JVM

Java Platform 1.2
Beta 4

Submit a bug or feature
Submit comments/suggestions about new javadoc look
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.
This documentation was generated with a post-Beta4 version of Javadoc.