DragSourceDropEventpublic class DragSourceDropEvent extends DragSourceEvent The DragSourceDropEvent is delivered
from the DragSourceContextPeer ,
via the DragSourceContext , to the dragDropEnd
method of DragSourceListener s 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 Summary |
---|
private static final long | serialVersionUID | private boolean | dropSuccesstrue if the drop was successful. | private int | dropActionThe drop action. |
Constructors Summary |
---|
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 .
super(dsc);
dropSuccess = success;
dropAction = action;
| 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 .
super(dsc, x, y);
dropSuccess = success;
dropAction = action;
| 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.
super(dsc);
dropSuccess = false;
|
Methods Summary |
---|
public int | getDropAction()This method returns an int representing
the action performed by the target on the subject of the drop. return dropAction;
| public boolean | getDropSuccess()This method returns a boolean indicating
if the drop was successful. return dropSuccess;
|
|