Package docking.dnd
Interface Draggable
- All Known Implementing Classes:
VersionHistoryPanel
public interface Draggable
Interface to define a drag source.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddragCanceled(DragSourceDropEvent event) Method called when the drag operation exits the drop target without dropping.intGet the drag actions supported by this drag source: DnDConstants.ACTION_MOVE DnDConstants.ACTION_COPY DnDConstants.ACTION_COPY_OR_MOVECalled by the DragGestureAdapter to start the drag.Get the object to transfer.booleanReturn true if the object at the location in the DragGesture event is draggable.voidmove()Do the move operation; called when the drag and drop operation completes.
-
Method Details
-
isStartDragOk
Return true if the object at the location in the DragGesture event is draggable.- Parameters:
e- event passed to a DragGestureListener via its dragGestureRecognized() method when a particular DragGestureRecognizer detects a platform dependent Drag and Drop action initiating gesture has occurred on the Component it is tracking.- See Also:
-
getDragSourceListener
DragSourceListener getDragSourceListener()Called by the DragGestureAdapter to start the drag. -
move
void move()Do the move operation; called when the drag and drop operation completes. -
dragCanceled
Method called when the drag operation exits the drop target without dropping.- Parameters:
event- TODO
-
getDragAction
int getDragAction()Get the drag actions supported by this drag source:- DnDConstants.ACTION_MOVE
- DnDConstants.ACTION_COPY
- DnDConstants.ACTION_COPY_OR_MOVE
- Returns:
- the drag actions
-
getTransferable
Get the object to transfer.- Parameters:
p- location of object to transfer- Returns:
- object to transfer
-