public interface DnDNodeModelFilter extends NodeModelFilter
NodeModelFilter
with support for Drag and Drop of nodes.Modifier and Type | Method and Description |
---|---|
Transferable |
drag(DnDNodeModel original,
Object node)
Initiate a drag operation.
|
int |
getAllowedDragActions(DnDNodeModel original)
Action constants from
DnDConstants . |
int |
getAllowedDropActions(DnDNodeModel original,
Transferable t)
Action constants from
DnDConstants . |
PasteType |
getDropType(DnDNodeModel original,
Object object,
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, removeModelListener
int getAllowedDragActions(DnDNodeModel original)
DnDConstants
.
No actions are allowed by default.original
- The original DnDNodeModel to filterint getAllowedDropActions(DnDNodeModel original, Transferable t)
DnDConstants
.
No actions are allowed by default.original
- The original DnDNodeModel to filtert
- 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(DnDNodeModel original, Object node) throws IOException, UnknownTypeException
original
- The original DnDNodeModel to filternode
- 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(DnDNodeModel original, Object object, Transferable t, int action, int index) throws UnknownTypeException
original
- The original DnDNodeModel to filternode
- The node where to dropt
- the transferable to dropaction
- the Drag and Drop action from DnDConstants
index
- index between children the drop occured at or -1 if not specifiednull
when the transferable cannot be acceptedUnknownTypeException
- if this model implementation is not
able to perform drop for given node typeBuilt on June 4 2024. | Copyright © 2017-2024 Apache Software Foundation. All Rights Reserved.