Package | com.yworks.yfiles.layout.tree |
Class | public class AssistantPlacer |
Inheritance | AssistantPlacer AbstractRotatableNodePlacer YObject Object |
Assistant placer provides the best results when using a port assignment that starts all edges at the same node. If the ports are distributed at the border, edge crossings may occur.
See also
Property | Defined By | ||
---|---|---|---|
childNodePlacer : NodePlacer
Getter:
Returns the child node placer for the non-assistant children. | AssistantPlacer | ||
modificationMatrix : AbstractRotatableNodePlacer_Matrix [read-only]
The actual modification matrix
| AbstractRotatableNodePlacer | ||
spacing : Number [override] | AssistantPlacer |
Method | Defined By | ||
---|---|---|---|
AssistantPlacer(init:Boolean = true)
Creates a default instance with horizontal orientation. | AssistantPlacer | ||
[override]
Creates a comparator that compares edges of two assistant nodes with the comparator created by com.yworks.yfiles.layout.tree.LeftRightPlacer and all other edges with the sketch comparator created by this placer's childNodePlacer. | AssistantPlacer | ||
[static]
Creates a comparator that compares edges connecting to assistant nodes with the given assistantComparator and all other edges with the given childComparator. | AssistantPlacer | ||
AbstractRotatableNodePlacer | |||
[override]
Creates a processor that creates a dummy node and changes the edges for the non-assistant children. | AssistantPlacer | ||
[override]
Delegates to the the left right placer. | AssistantPlacer | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | AssistantPlacer | ||
hashCode():int | YObject | ||
[static]
Creates a default instance with horizontal orientation. | AssistantPlacer | ||
[static]
Creates an AssistantPlacer for the given modification matrix. | AssistantPlacer | ||
placeSubtree(nodeShapeProvider:DataProvider, subtreeShapeProvider:DataProvider, graph:LayoutGraph, localRoot:Node, parentConnectorDirection:int):GenericTreeLayouter_SubtreeShape [override]
Places the shapes. | AssistantPlacer | ||
[static]
Translates a "real world point" to a "model point"
| AbstractRotatableNodePlacer |
Method | Defined By | ||
---|---|---|---|
createRootNodeShape(node:Node):SubtreeShapeRotated
Convenience method that queries the DataProvider for the shape of a single node as a SubtreeShape instance. | AbstractRotatableNodePlacer | ||
createSubtreeShape(node:Node):SubtreeShapeRotated
Convenience method that queries the DataProvider for a SubtreeShape. | AbstractRotatableNodePlacer | ||
determineChildConnector(child:Node):int [override]
| AssistantPlacer | ||
Returns the subtree shape for the given child node. | AssistantPlacer | ||
Lookup method to get the PortConstraint for the local root translated. | AbstractRotatableNodePlacer | ||
Translates the absolute source point of the given edge to the "view coordinates" (translated by the modification matrix)
| AbstractRotatableNodePlacer | ||
initAbstractRotatableNodePlacer(modificationMatrix:AbstractRotatableNodePlacer_Matrix):void | AbstractRotatableNodePlacer | ||
initAssistantPlacer1():void
Initializes this object. | AssistantPlacer | ||
initAssistantPlacer2(modificationMatrix:AbstractRotatableNodePlacer_Matrix):void
Initializes this object. | AssistantPlacer | ||
placeSubtreeCore(localRoot:Node, parentConnectorDirection:int):SubtreeShapeRotated [override]
| AssistantPlacer | ||
translateDirectionToModel(realDirection:int):int
Translates a "real" direction into a directionModel direction
| AbstractRotatableNodePlacer | ||
translateDirectionToReal(modelDirection:int):int
Translates a modelDirectionModel into the "real" directionModel
| AbstractRotatableNodePlacer |
Constant | Defined By | ||
---|---|---|---|
ASSISTANT_DPKEY : Object = y.layout.tree.AssistantPlacer.ASSISTANT_DPKEY [static]
Contains a boolean for each node whether it is an assistant or not. True: Is assistant False: Is not an assistant
| AssistantPlacer |
childNodePlacer | property |
childNodePlacer:NodePlacer
Getter: Returns the child node placer for the non-assistant children.
Setter: Sets the child node placer. The child node placer is used to arrange the nodes that are not assistants. ASSISTANT_DPKEY public function get childNodePlacer():NodePlacer
public function set childNodePlacer(value:NodePlacer):void
See also
spacing | property |
spacing:Number
[override] public function get spacing():Number
public function set spacing(value:Number):void
AssistantPlacer | () | Constructor |
public function AssistantPlacer(init:Boolean = true)
Creates a default instance with horizontal orientation. Call to this(Matrix.DEFAULT)
Parametersinit:Boolean (default = true ) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods.
This parameter can safely be ignored/omitted when calling the constructor.
|
createComparator | () | method |
override public function createComparator():Comparator
Creates a comparator that compares edges of two assistant nodes with the comparator created by com.yworks.yfiles.layout.tree.LeftRightPlacer and all other edges with the sketch comparator created by this placer's childNodePlacer
.
Comparator — a comparator to compare two edges.
|
See also
createCompoundComparator | () | method |
public static function createCompoundComparator(assistantComparator:Comparator, childComparator:Comparator):Comparator
Creates a comparator that compares edges connecting to assistant nodes with the given assistantComparator
and all other edges with the given childComparator
.
Parameters
assistantComparator:Comparator — the comparator for assistant edges
| |
childComparator:Comparator — the comparator for non-assistants edges
|
Comparator — a comparator that compares edges connecting to assistant nodes with the given assistantComparator and all other edges with the given childComparator .
|
createProcessor | () | method |
override public function createProcessor(layouter:GenericTreeLayouter, graph:LayoutGraph, currentRoot:Node):Processor
Creates a processor that creates a dummy node and changes the edges for the non-assistant children.
Parameters
layouter:GenericTreeLayouter | |
graph:LayoutGraph | |
currentRoot:Node |
Processor — the processor that changes the graph structure suitable for the AssistantPlacer
|
determineChildConnector | () | method |
override protected function determineChildConnector(child:Node):int
Parameters
child:Node |
int — should not be called and throws a IllegalStateException
|
determineChildConnectors | () | method |
override public function determineChildConnectors(localRoot:Node, connectorMap:DataMap):void
Delegates to the the left right placer.
Parameters
localRoot:Node | |
connectorMap:DataMap |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getNodeShape | () | method |
protected function getNodeShape(node:Node):GenericTreeLayouter_SubtreeShape
Returns the subtree shape for the given child node.
Parameters
node:Node — the child node the subtree shape is returned for.
|
GenericTreeLayouter_SubtreeShape — the subtree shape for the given child node.
|
initAssistantPlacer1 | () | method |
protected final function initAssistantPlacer1():void
Initializes this object. See the documentation of the corresponding factory method newAssistantPlacer1()
for details.
See also
initAssistantPlacer2 | () | method |
protected final function initAssistantPlacer2(modificationMatrix:AbstractRotatableNodePlacer_Matrix):void
Initializes this object. See the documentation of the corresponding factory method newAssistantPlacer2()
for details.
Parameters
modificationMatrix:AbstractRotatableNodePlacer_Matrix |
See also
newAssistantPlacer1 | () | method |
public static function newAssistantPlacer1():AssistantPlacer
Creates a default instance with horizontal orientation. Call to this(Matrix.DEFAULT)
ReturnsAssistantPlacer |
newAssistantPlacer2 | () | method |
public static function newAssistantPlacer2(modificationMatrix:AbstractRotatableNodePlacer_Matrix):AssistantPlacer
Creates an AssistantPlacer for the given modification matrix.
Parameters
modificationMatrix:AbstractRotatableNodePlacer_Matrix — the modification matrix that is used as translation matrix.
|
AssistantPlacer |
placeSubtree | () | method |
override public function placeSubtree(nodeShapeProvider:DataProvider, subtreeShapeProvider:DataProvider, graph:LayoutGraph, localRoot:Node, parentConnectorDirection:int):GenericTreeLayouter_SubtreeShape
Places the shapes.
Parameters
nodeShapeProvider:DataProvider | |
subtreeShapeProvider:DataProvider | |
graph:LayoutGraph | |
localRoot:Node | |
parentConnectorDirection:int |
GenericTreeLayouter_SubtreeShape |
placeSubtreeCore | () | method |
override protected function placeSubtreeCore(localRoot:Node, parentConnectorDirection:int):SubtreeShapeRotated
Parameters
localRoot:Node | |
parentConnectorDirection:int |
SubtreeShapeRotated — Should not be called - throws IllegalStateException
|
ASSISTANT_DPKEY | Constant |
public static const ASSISTANT_DPKEY:Object = y.layout.tree.AssistantPlacer.ASSISTANT_DPKEY
Contains a boolean for each node whether it is an assistant or not. True: Is assistant False: Is not an assistant