Package se.datadosen.explorer
Class ExplorerTreeTransferHandler
java.lang.Object
se.datadosen.dnd.AbstractTreeTransferHandler
se.datadosen.explorer.ExplorerTreeTransferHandler
- All Implemented Interfaces:
DragGestureListener
,DragSourceListener
,DropTargetListener
,EventListener
-
Field Summary
Fields inherited from class se.datadosen.dnd.AbstractTreeTransferHandler
dragSource, tree
-
Constructor Summary
ConstructorDescriptionExplorerTreeTransferHandler
(JTree tree, JComponent albumRootComponent, JAlbumExplorer context) ExplorerTreeTransferHandler
(JTree tree, JAlbumExplorer context) -
Method Summary
Modifier and TypeMethodDescriptionint
albumObjectsDragged
(DropTargetDragEvent dtde, int action, Point location) boolean
canDropNode
(DropTargetContext dtc, DefaultMutableTreeNode draggedNode, int action, Point location) int
Override to provide custom behaviorboolean
executeAlbumObjectDrop
(DefaultMutableTreeNode newParentNode, DropTargetDropEvent dtde) boolean
executeDrop
(List<File> droppedFiles, DefaultMutableTreeNode newParentNode, DropTargetDropEvent dtde) boolean
executeDrop
(DefaultMutableTreeNode draggedNode, DefaultMutableTreeNode newParentNode, DropTargetDropEvent dtde) int
filesDragged
(DropTargetDragEvent dtde, int action, Point location) protected DefaultMutableTreeNode
resolveTargetNode
(Point pt, DropTargetContext dtc) Override to map drops on non-tree components as a tree dropMethods inherited from class se.datadosen.dnd.AbstractTreeTransferHandler
autoscroll, dragDropEnd, dragEnter, dragEnter, dragExit, dragExit, dragGestureRecognized, dragOver, dragOver, drop, dropActionChanged, dropActionChanged
-
Constructor Details
-
ExplorerTreeTransferHandler
-
ExplorerTreeTransferHandler
public ExplorerTreeTransferHandler(JTree tree, JComponent albumRootComponent, JAlbumExplorer context)
-
-
Method Details
-
resolveTargetNode
Description copied from class:AbstractTreeTransferHandler
Override to map drops on non-tree components as a tree drop- Overrides:
resolveTargetNode
in classAbstractTreeTransferHandler
-
canDropNode
public boolean canDropNode(DropTargetContext dtc, DefaultMutableTreeNode draggedNode, int action, Point location) - Specified by:
canDropNode
in classAbstractTreeTransferHandler
-
albumObjectsDragged
- Specified by:
albumObjectsDragged
in classAbstractTreeTransferHandler
-
filesDragged
- Specified by:
filesDragged
in classAbstractTreeTransferHandler
-
decideDropAction
Description copied from class:AbstractTreeTransferHandler
Override to provide custom behavior- Overrides:
decideDropAction
in classAbstractTreeTransferHandler
- Parameters:
dte
-- Returns:
-
executeDrop
public boolean executeDrop(DefaultMutableTreeNode draggedNode, DefaultMutableTreeNode newParentNode, DropTargetDropEvent dtde) throws IOException - Specified by:
executeDrop
in classAbstractTreeTransferHandler
- Throws:
IOException
-
executeDrop
public boolean executeDrop(List<File> droppedFiles, DefaultMutableTreeNode newParentNode, DropTargetDropEvent dtde) - Specified by:
executeDrop
in classAbstractTreeTransferHandler
-
executeAlbumObjectDrop
public boolean executeAlbumObjectDrop(DefaultMutableTreeNode newParentNode, DropTargetDropEvent dtde) throws IOException - Specified by:
executeAlbumObjectDrop
in classAbstractTreeTransferHandler
- Throws:
IOException
-