Home » openjdk-7 » java » awt » dnd » [javadoc | source]
java.awt.dnd
public class: DragSourceDropEvent [javadoc | source]
java.lang.Object
   java.util.EventObject
      java.awt.dnd.DragSourceEvent
         java.awt.dnd.DragSourceDropEvent

All Implemented Interfaces:
    Serializable

The DragSourceDropEvent is delivered from the DragSourceContextPeer, via the DragSourceContext, to the dragDropEnd method of DragSourceListeners registered with that DragSourceContext and with its associated DragSource. It contains sufficient information for the originator of the operation to provide appropriate feedback to the end user when the operation completes.

Fields inherited from java.util.EventObject:
source
Constructor:
 public DragSourceDropEvent(DragSourceContext dsc) 
    Construct a DragSourceDropEvent for a drag that does not result in a drop. The coordinates for this DragSourceDropEvent are not specified, so getLocation will return null for this event.
    Parameters:
    dsc - the DragSourceContext
    Throws:
    IllegalArgumentException< - /code> if dsc is null.
    Also see:
    DragSourceEvent#getLocation
 public DragSourceDropEvent(DragSourceContext dsc,
    int action,
    boolean success) 
    Construct a DragSourceDropEvent for a drop, given the DragSourceContext, the drop action, and a boolean indicating if the drop was successful. The coordinates for this DragSourceDropEvent are not specified, so getLocation will return null for this event.

    The argument action should be one of DnDConstants that represents a single action. This constructor does not throw any exception for invalid action.

    Parameters:
    dsc - the DragSourceContext associated with this DragSourceDropEvent
    action - the drop action
    success - a boolean indicating if the drop was successful
    Throws:
    IllegalArgumentException< - /code> if dsc is null.
    Also see:
    DragSourceEvent#getLocation
 public DragSourceDropEvent(DragSourceContext dsc,
    int action,
    boolean success,
    int x,
    int y) 
    Construct a DragSourceDropEvent for a drop, given the DragSourceContext, the drop action, a boolean indicating if the drop was successful, and coordinates.

    The argument action should be one of DnDConstants that represents a single action. This constructor does not throw any exception for invalid action.

    Parameters:
    dsc - the DragSourceContext associated with this DragSourceDropEvent
    action - the drop action
    success - a boolean indicating if the drop was successful
    x - the horizontal coordinate for the cursor location
    y - the vertical coordinate for the cursor location
    Throws:
    IllegalArgumentException< - /code> if dsc is null.
    since: 1.4 -
Method from java.awt.dnd.DragSourceDropEvent Summary:
getDropAction,   getDropSuccess
Methods from java.awt.dnd.DragSourceEvent:
getDragSourceContext,   getLocation,   getX,   getY
Methods from java.util.EventObject:
getSource,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.awt.dnd.DragSourceDropEvent Detail:
 public int getDropAction() 
    This method returns an int representing the action performed by the target on the subject of the drop.
 public boolean getDropSuccess() 
    This method returns a boolean indicating if the drop was successful.