java.lang.Object
org.jpo.gui.JpoTransferableDropTargetListener
- All Implemented Interfaces:
DropTargetListener,EventListener
A drop target listener for the transferable
-
Constructor Summary
ConstructorsConstructorDescriptionJpoTransferableDropTargetListener(JpoDropTargetDropEventHandler jpoDropTargetDropEventHandler) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoiddragEnter(DropTargetDragEvent event) this callback method is invoked every time something is dragged onto the ThumbnailController.voiddragExit(DropTargetEvent event) this callback method is invoked to tell the dropTarget that the drag has moved on to something else.voiddragOver(DropTargetDragEvent event) this callback method is invoked every time something is dragged over the ThumbnailController.voiddrop(DropTargetDropEvent event) This method is called when the drop occurs.voidthis 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:
dragEnterin 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:
dragOverin 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:
dropActionChangedin 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:
dragExitin interfaceDropTargetListener- Parameters:
event- The event
-
drop
This method is called when the drop occurs. It gives the hard work to the SortableDefaultMutableTreeNode.- Specified by:
dropin interfaceDropTargetListener- Parameters:
event- The event
-