java.lang.Object
org.jpo.gui.JpoTransferableDropTargetListener
- All Implemented Interfaces:
DropTargetListener
,EventListener
A drop target listener for the transferable
-
Constructor Summary
ConstructorDescriptionJpoTransferableDropTargetListener
(JpoDropTargetDropEventHandler jpoDropTargetDropEventHandler) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
dragEnter
(DropTargetDragEvent event) this callback method is invoked every time something is dragged onto the ThumbnailController.void
dragExit
(DropTargetEvent event) this callback method is invoked to tell the dropTarget that the drag has moved on to something else.void
dragOver
(DropTargetDragEvent event) this callback method is invoked every time something is dragged over the ThumbnailController.void
drop
(DropTargetDropEvent event) This method is called when the drop occurs.void
this callback method is invoked when the user presses or releases shift when doing a drag.
-
Constructor Details
-
JpoTransferableDropTargetListener
public JpoTransferableDropTargetListener(JpoDropTargetDropEventHandler jpoDropTargetDropEventHandler) Constructor- Parameters:
jpoDropTargetDropEventHandler
- Event handler
-
-
Method Details
-
dragEnter
this callback method is invoked every time something is dragged onto the ThumbnailController. We check if the desired DataFlavor is supported and then reject the drag if it is not.- Specified by:
dragEnter
in interfaceDropTargetListener
- Parameters:
event
- The event
-
dragOver
this callback method is invoked every time something is dragged over the ThumbnailController. We could do some highlighting if we so desired.- Specified by:
dragOver
in interfaceDropTargetListener
- Parameters:
event
- The event
-
dropActionChanged
this callback method is invoked when the user presses or releases shift when doing a drag. He can signal that he wants to change the copy / move of the operation. This method could intercept this change and could modify the event if it needs to. On Thumbnails this does nothing.- Specified by:
dropActionChanged
in interfaceDropTargetListener
- Parameters:
event
- The event
-
dragExit
this callback method is invoked to tell the dropTarget that the drag has moved on to something else. We do nothing here.- Specified by:
dragExit
in interfaceDropTargetListener
- Parameters:
event
- The event
-
drop
This method is called when the drop occurs. It gives the hard work to the SortableDefaultMutableTreeNode.- Specified by:
drop
in interfaceDropTargetListener
- Parameters:
event
- The event
-