Class AbstractTreeTransferHandler
java.lang.Object
javax.swing.TransferHandler
com.inductiveautomation.ignition.client.util.gui.tree.AbstractTreeTransferHandler
- All Implemented Interfaces:
- DropTargetListener,- Serializable,- EventListener
- Direct Known Subclasses:
- ClientTagTreeTransferHandler,- TagTransferHandler
public abstract class AbstractTreeTransferHandler
extends TransferHandler
implements DropTargetListener
A class that can acts as a 1.4 TransferHandler, and a 1.3 DropTargetListener all at once.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class javax.swing.TransferHandlerTransferHandler.DropLocation, TransferHandler.TransferSupport
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Strokeprotected TreePathprotected Rectangleprotected AutoscrollingJTreeFields inherited from class javax.swing.TransferHandlerCOPY, COPY_OR_MOVE, LINK, MOVE, NONE
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAbstractTreeTransferHandler(AutoscrollingJTree tree, int action, boolean beADropTarget) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract booleancanPerformAction(AutoscrollingJTree target, List<DataFlavor> flavors, int action, Point location, TreePath dropPath) protected abstract booleancanStartDrag(TreePath[] paths) protected voidprotected TransferablecreateTransferable(JComponent c, boolean drag) protected abstract TransferablecreateTransferableForCutCopy(TreePath[] paths) protected abstract TransferablecreateTransferableForDrag(TreePath[] paths) voiddragEnter(DropTargetDragEvent dtde) voiddragExit(DropTargetEvent dte) voiddragOver(DropTargetDragEvent dtde) protected voiddrawHighlight(TreePath path) voiddrop(DropTargetDropEvent dtde) voidprotected abstract booleanexecuteDrop(AutoscrollingJTree tree, Transferable transferable, TreePath parentTreePath, int action) voidexportToClipboard(JComponent comp, Clipboard clip, int action) Copied from super so that it calls createTransferableForCutCopy instead of the normal one.int---------------------------- Methods from TransferHandler ------------------------------protected abstract intgetSourceActions(TreePath[] selPaths) Override to provide the actions available for the given pathsprotected TreePathMethods inherited from class javax.swing.TransferHandlercanImport, canImport, exportAsDrag, exportDone, getCopyAction, getCutAction, getDragImage, getDragImageOffset, getPasteAction, getVisualRepresentation, importData, importData, setDragImage, setDragImageOffset
- 
Field Details- 
tree
- 
rect
- 
lastHighlight
- 
highlightStroke
 
- 
- 
Constructor Details- 
AbstractTreeTransferHandler- Parameters:
- tree- The tree in question.
- action- A bitmask to use as the acceptable actions (@see- DropTarget.getDefaultActions()
- beADropTarget- Should this tree be a drop target?
 
 
- 
- 
Method Details- 
drawHighlight
- 
clearHighlightprotected void clearHighlight()
- 
dragEnter- Specified by:
- dragEnterin interface- DropTargetListener
 
- 
dragExit- Specified by:
- dragExitin interface- DropTargetListener
 
- 
dragOver- Specified by:
- dragOverin interface- DropTargetListener
 
- 
dropActionChanged- Specified by:
- dropActionChangedin interface- DropTargetListener
 
- 
drop- Specified by:
- dropin interface- DropTargetListener
 
- 
pathFor
- 
getSourceActions---------------------------- Methods from TransferHandler ------------------------------- Overrides:
- getSourceActionsin class- TransferHandler
 
- 
getSourceActionsOverride to provide the actions available for the given paths
- 
createTransferable- Overrides:
- createTransferablein class- TransferHandler
 
- 
createTransferable
- 
exportToClipboardpublic void exportToClipboard(JComponent comp, Clipboard clip, int action) throws IllegalStateException Copied from super so that it calls createTransferableForCutCopy instead of the normal one.- Overrides:
- exportToClipboardin class- TransferHandler
- Throws:
- IllegalStateException
 
- 
canStartDrag
- 
createTransferableForDrag
- 
createTransferableForCutCopy
- 
canPerformActionprotected abstract boolean canPerformAction(AutoscrollingJTree target, List<DataFlavor> flavors, int action, Point location, TreePath dropPath) 
- 
executeDropprotected abstract boolean executeDrop(AutoscrollingJTree tree, Transferable transferable, TreePath parentTreePath, int action) 
 
-