public interface DnDNodeModel extends NodeModel
NodeModel with support for Drag and Drop of nodes.| Modifier and Type | Method and Description |
|---|---|
Transferable |
drag(Object node)
Initiate a drag operation.
|
int |
getAllowedDragActions()
Action constants from
DnDConstants. |
int |
getAllowedDropActions(Transferable t)
Action constants from
DnDConstants. |
PasteType |
getDropType(Object node,
Transferable t,
int action,
int index)
Determines if there is a paste operation that can be performed
on provided transferable when drop is done.
|
addModelListener, getDisplayName, getIconBase, getShortDescription, removeModelListenerint getAllowedDragActions()
DnDConstants.
No actions are allowed by default.int getAllowedDropActions(Transferable t)
DnDConstants.
No actions are allowed by default.t - The transferable for which the allowed drop actions are requested,
or null to get actions for the creation of DropTarget for the view.Transferable drag(Object node) throws IOException, UnknownTypeException
node - The node to dragIOException - when the drag cannot be performedUnknownTypeException - if this model implementation is not
able to perform drag for given node typePasteType getDropType(Object node, Transferable t, int action, int index) throws UnknownTypeException
node - The node where to dropt - the transferable to dropaction - the Drag and Drop action from DnDConstantsindex - index between children the drop occured at or -1 if not specifiedUnknownTypeException - if this model implementation is not
able to perform drop for given node typeBuilt on May 22 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.