Package docking
Class ErrLogExpandableDialog.ExcTreeTransferHandler
- java.lang.Object
-
- javax.swing.TransferHandler
-
- docking.ErrLogExpandableDialog.ExcTreeTransferHandler
-
- All Implemented Interfaces:
GTreeDragNDropHandler
,GTreeTransferHandler
,java.io.Serializable
- Enclosing class:
- ErrLogExpandableDialog
protected static class ErrLogExpandableDialog.ExcTreeTransferHandler extends javax.swing.TransferHandler implements GTreeDragNDropHandler
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected docking.ErrLogExpandableDialog.ReportRootNode
root
-
Constructor Summary
Constructors Constructor Description ExcTreeTransferHandler(docking.ErrLogExpandableDialog.ReportRootNode root)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.awt.datatransfer.Transferable
createTransferable(javax.swing.JComponent c)
void
drop(GTreeNode destUserData, java.awt.datatransfer.Transferable transferable, int dropAction)
Add the given transferable's data to the destination user data.int
getSourceActions(javax.swing.JComponent c)
java.awt.datatransfer.DataFlavor[]
getSupportedDataFlavors(java.util.List<GTreeNode> transferNodes)
Returns the DataFlavors for the types of data that this transferable supports, based upon the given selection.int
getSupportedDragActions()
Returns the supported Drag actions for this tree.java.lang.Object
getTransferData(java.util.List<GTreeNode> transferNodes, java.awt.datatransfer.DataFlavor flavor)
Gets the transfer data from the selection based upon the given flavor.boolean
isDropSiteOk(GTreeNode destUserData, java.awt.datatransfer.DataFlavor[] flavors, int dropAction)
Return true if the drop site is valid for the given target.boolean
isStartDragOk(java.util.List<GTreeNode> dragUserData, int dragAction)
Return true if the dragUserData can be dragged.
-
-
-
Method Detail
-
getSupportedDataFlavors
public java.awt.datatransfer.DataFlavor[] getSupportedDataFlavors(java.util.List<GTreeNode> transferNodes)
Description copied from interface:GTreeTransferHandler
Returns the DataFlavors for the types of data that this transferable supports, based upon the given selection.- Specified by:
getSupportedDataFlavors
in interfaceGTreeTransferHandler
- Parameters:
transferNodes
- The nodes to base the DataFlavor selection upon.- Returns:
- the DataFlavors for the types of data that this transferable supports, based upon the given selection.
-
createTransferable
protected java.awt.datatransfer.Transferable createTransferable(javax.swing.JComponent c)
- Overrides:
createTransferable
in classjavax.swing.TransferHandler
-
getTransferData
public java.lang.Object getTransferData(java.util.List<GTreeNode> transferNodes, java.awt.datatransfer.DataFlavor flavor) throws java.awt.datatransfer.UnsupportedFlavorException
Description copied from interface:GTreeTransferHandler
Gets the transfer data from the selection based upon the given flavor.- Specified by:
getTransferData
in interfaceGTreeTransferHandler
- Parameters:
transferNodes
- The nodes from which to get the data.flavor
- The flavor of data to retrieve from the given selection.- Returns:
- the transfer data from the selection based upon the given flavor.
- Throws:
java.awt.datatransfer.UnsupportedFlavorException
- if the given flavor is not one of the supported flavors returned byGTreeTransferHandler.getSupportedDataFlavors(List)
.
-
isStartDragOk
public boolean isStartDragOk(java.util.List<GTreeNode> dragUserData, int dragAction)
Description copied from interface:GTreeDragNDropHandler
Return true if the dragUserData can be dragged.- Specified by:
isStartDragOk
in interfaceGTreeDragNDropHandler
- Parameters:
dragUserData
- data where user is initiating the drag operationdragAction
- user action for the drag operation
-
getSupportedDragActions
public int getSupportedDragActions()
Description copied from interface:GTreeDragNDropHandler
Returns the supported Drag actions for this tree. For available actions seeDnDConstants
.- Specified by:
getSupportedDragActions
in interfaceGTreeDragNDropHandler
- Returns:
- the supported Drag actions.
-
getSourceActions
public int getSourceActions(javax.swing.JComponent c)
- Overrides:
getSourceActions
in classjavax.swing.TransferHandler
-
isDropSiteOk
public boolean isDropSiteOk(GTreeNode destUserData, java.awt.datatransfer.DataFlavor[] flavors, int dropAction)
Description copied from interface:GTreeDragNDropHandler
Return true if the drop site is valid for the given target.- Specified by:
isDropSiteOk
in interfaceGTreeDragNDropHandler
- Parameters:
destUserData
- destination for node being draggedflavors
- flavor(s) being draggeddropAction
- user action for drop operation
-
drop
public void drop(GTreeNode destUserData, java.awt.datatransfer.Transferable transferable, int dropAction)
Description copied from interface:GTreeDragNDropHandler
Add the given transferable's data to the destination user data.- Specified by:
drop
in interfaceGTreeDragNDropHandler
- Parameters:
destUserData
- destination node for the data.transferable
- the transferable being dragged whose data will be dropped.dropAction
- user action for drop operation
-
-