Package docking.dnd
Class DragSrcAdapter
java.lang.Object
docking.dnd.DragSrcAdapter
- All Implemented Interfaces:
DragSourceListener
,EventListener
Adapter class that receives notifications in order to provide drag over effects.
When the operation ends, this class receives a dragDropEnd
message, and is
responsible for checking the success of the operation. If the operation was successful, and if it
was a Move, then this class will remove the source data.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
void
protected Cursor
getDropOkCursor
(int action) Get the cursor for an "OK" drop.protected void
Sets the cursor according to the actions that are legal.
-
Field Details
-
dragComponent
-
-
Constructor Details
-
DragSrcAdapter
Constructor- Parameters:
dragComponent
- component that can be dragged.
-
-
Method Details
-
dragDropEnd
- Specified by:
dragDropEnd
in interfaceDragSourceListener
-
dragEnter
- Specified by:
dragEnter
in interfaceDragSourceListener
-
dragOver
- Specified by:
dragOver
in interfaceDragSourceListener
-
dragExit
- Specified by:
dragExit
in interfaceDragSourceListener
-
dropActionChanged
- Specified by:
dropActionChanged
in interfaceDragSourceListener
-
setDragOverFeedback
Sets the cursor according to the actions that are legal.- Parameters:
e
- the event
-
getDropOkCursor
Get the cursor for an "OK" drop.- Parameters:
action
- action for the drag operation (copy, move, link)- Returns:
- cursor that is appropriate for the give action
-