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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidprotected CursorgetDropOkCursor(int action) Get the cursor for an "OK" drop.protected voidSets 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:
dragDropEndin interfaceDragSourceListener
-
dragEnter
- Specified by:
dragEnterin interfaceDragSourceListener
-
dragOver
- Specified by:
dragOverin interfaceDragSourceListener
-
dragExit
- Specified by:
dragExitin interfaceDragSourceListener
-
dropActionChanged
- Specified by:
dropActionChangedin 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
-