Package | com.yworks.graph.input |
Class | public class ReparentNodeHandler |
Inheritance | ReparentNodeHandler Object |
Implements | IReparentNodeHandler |
IReparentNodeHandler
that treats control key presses as reparent gestures and allows
for reparenting all nodes.
Property | Defined By | ||
---|---|---|---|
reparentRecognizer : Function
Gets or sets the event recognizer function that will be queried
to determine whether the gesture is a reparent gesture. | ReparentNodeHandler |
Method | Defined By | ||
---|---|---|---|
Creates a new instance. | ReparentNodeHandler | ||
Determines whether the user may detach the given node from its current parent in
order to reparent it. | ReparentNodeHandler | ||
Determines whether the current gesture that can be determined through the
context is a reparent gesture. | ReparentNodeHandler | ||
Determines whether the provided node may be reparented to a new parent. | ReparentNodeHandler | ||
Performs the actual reparenting after the reparent gesture has been finalized. | ReparentNodeHandler |
reparentRecognizer | property |
reparentRecognizer:Function
Gets or sets the event recognizer function that will be queried to determine whether the gesture is a reparent gesture.
An event recognizer function takes an Event
as the only parameter
and returns a Boolean that indicates whether the given event was recognized.
The default value is EventRecognizers.SHIFT_PRESSED
.
public function get reparentRecognizer():Function
public function set reparentRecognizer(value:Function):void
See also
ReparentNodeHandler | () | Constructor |
public function ReparentNodeHandler()
Creates a new instance.
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.
|