|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface INodeDragAndDropPolicy
A policy used for controlling the drag & drop operations within the tree table. A tree node has to be a drag source in order to be draggable. The node on which the user wants to drop the node has to be a possible drop target for the dragged node.
Method Summary | |
---|---|
int |
getDragActions(java.lang.Object node,
ITreeTableModel model)
Determines how the given node can be dragged (copy, move, copy or move, none). |
ICommand |
getDragAndDropCommand(java.lang.Object droppedNode,
java.lang.Object oldParent,
ITreeTableModel oldModel,
int oldChildIndex,
java.lang.Object newParent,
ITreeTableModel newModel,
int newChildIndex,
int dropAction)
Returns the command object that will perform the actual changes required in order to detach the node from its current parent and attach it to its new parent. |
int |
getDropActions(java.lang.Object draggedNode,
java.lang.Object draggedNodeParent,
ITreeTableModel draggedNodeModel,
java.lang.Object newParentNode,
ITreeTableModel newModel)
Determines how the given dragged node can be dropped onto the given new parent node (copy, move, copy or move, none). |
Method Detail |
---|
int getDragActions(java.lang.Object node, ITreeTableModel model)
DnDConstants
class.
node
- the node to check for its drag capabilitymodel
- the model to which the node belongs
DnDConstants
)int getDropActions(java.lang.Object draggedNode, java.lang.Object draggedNodeParent, ITreeTableModel draggedNodeModel, java.lang.Object newParentNode, ITreeTableModel newModel)
dragActions
argument and the return value are defined as
constants in the DnDConstants
class.
draggedNode
- the dragged nodedraggedNodeParent
- the parent to which the dragged node belongsdraggedNodeModel
- the model to which the node belongsnewParentNode
- the candidate node for being the new parent of the dragged
nodenewModel
- the model to which the new parent belongs
DnDConstants
)ICommand getDragAndDropCommand(java.lang.Object droppedNode, java.lang.Object oldParent, ITreeTableModel oldModel, int oldChildIndex, java.lang.Object newParent, ITreeTableModel newModel, int newChildIndex, int dropAction)
droppedNode
- the droppedNode nodeoldParent
- the parent to which the dragged node belongsoldModel
- the model to which the node belongsoldChildIndex
- the location of the dragged node inside the list of children
nodes of its current parentnewParent
- the candidate node for being the new parent of the dragged
nodenewModel
- the model to which the new parent belongsnewChildIndex
- the location of the dragged node inside the list of children
nodes of its new parentdropAction
- contains drop action identifier (possible values listed in
DnDConstants
).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |