Package | com.yworks.graph.input |
Interface | public interface IReparentNodeHandler |
Implementors | ReparentNodeHandler |
Implementations of this interface are queried from the IInputModeContext
by code that wants to reparent a node. Specifically this is used by
the implementation provided by GroupedGraph
that will be used
to reparent nodes during the dragging of nodes.
See also
Method | Defined By | ||
---|---|---|---|
Determines whether the user may detach the given node from its current parent in
order to reparent it. | IReparentNodeHandler | ||
Determines whether the current gesture that can be determined through the
context is a reparent gesture. | IReparentNodeHandler | ||
Determines whether the provided node may be reparented to a new parent. | IReparentNodeHandler | ||
Performs the actual reparenting after the reparent gesture has been finalized. | IReparentNodeHandler |
canReparent | () | method |
public function canReparent(context:IInputModeContext, node:INode):Boolean
Determines whether the user may detach the given node from its current parent in order to reparent it.
Parameters
context:IInputModeContext — The context that provides information about the user input.
| |
node:INode — The node that is about to be detached from its current parent.
|
Boolean — Whether the node may be detached and reparented.
|
isReparentGesture | () | method |
public function isReparentGesture(context:IInputModeContext, node:INode):Boolean
Determines whether the current gesture that can be determined through the context is a reparent gesture.
Parameters
context:IInputModeContext — The context that provides information about the user input.
| |
node:INode — The node that will possibly be reparented.
|
Boolean — Whether this is a reparenting gesture.
|
isValidParent | () | method |
public function isValidParent(context:IInputModeContext, node:INode, newParent:INode):Boolean
Determines whether the provided node may be reparented to a new parent.
Parameters
context:IInputModeContext — The context that provides information about the user input.
| |
node:INode — The node that will be reparented.
| |
newParent:INode — The potential new parent.
|
Boolean — Whether newParent is a valid new parent for node .
|
reparent | () | method |
public function reparent(context:IInputModeContext, node:INode, newParent:INode):void
Performs the actual reparenting after the reparent gesture has been finalized.
Parameters
context:IInputModeContext — The context that provides information about the user input.
| |
node:INode — The node that will be reparented.
| |
newParent:INode — The potential new parent.
|