Packagecom.yworks.yfiles.layout.tree
Classpublic class DelegatingNodePlacer
InheritanceDelegatingNodePlacer Inheritance AbstractRotatableNodePlacer Inheritance YObject Inheritance Object

The DelegatingNodePlacer may be used to layout the children of the actual node with two different NodePlacers.



Public Properties
 PropertyDefined By
 InheritedmodificationMatrix : AbstractRotatableNodePlacer_Matrix
[read-only] The actual modification matrix
AbstractRotatableNodePlacer
  orientation : int
Specifies the orientation according to which node shapes are aligned by this placer.
DelegatingNodePlacer
  placerLowerRight : NodePlacer
[read-only] Returns the NodePlacer that is used to layout the nodes on the "lower right"
DelegatingNodePlacer
  placerUpperLeft : NodePlacer
[read-only] Returns the NodePlacer that is used to layout the nodes on the "upper left"
DelegatingNodePlacer
 Inheritedspacing : Number
Specifies the spacing between subtrees this NodePlacer is arranging.
AbstractRotatableNodePlacer
Protected Properties
 PropertyDefined By
 InheritedcreatedChildren : List
List containing the created children
AbstractRotatableNodePlacer
 Inheritedgraph : LayoutGraph
The graph instance this class is working on
AbstractRotatableNodePlacer
 InheritednodeShapeProvider : DataProvider
The actual node shape provider
AbstractRotatableNodePlacer
 Inherited_spacing : Number
This is the "default" spacing for the different move operations.
AbstractRotatableNodePlacer
 InheritedsubtreeShapeProvider : DataProvider
The actual subtree shape provider
AbstractRotatableNodePlacer
Public Methods
 MethodDefined By
  
DelegatingNodePlacer(modificationMatrix:AbstractRotatableNodePlacer_Matrix, placerUpperLeft:NodePlacer, placerLowerRight:NodePlacer, init:Boolean = true)
Creates a new instance using the given modification matrix an the node placers "this" delegates to.
DelegatingNodePlacer
 Inherited
AbstractRotatableNodePlacer
 Inherited
AbstractRotatableNodePlacer
  
[override] Creates a processor that partitions child nodes of the specified root node into two subsets, one to be arranged by the "upper left" NodePlacer and one to be arranged by the "lower right" NodePlacer.
DelegatingNodePlacer
  
determineChildConnectors(localRoot:Node, connectorMap:DataMap):void
[override]
DelegatingNodePlacer
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
DelegatingNodePlacer
 Inherited
hashCode():int
YObject
  
[static] Creates a new instance using the given modification matrix an the node placers "this" delegates to.
DelegatingNodePlacer
  
placeSubtree(nodeShapeProvider:DataProvider, subtreeShapeProvider:DataProvider, graph:LayoutGraph, localRoot:Node, parentConnectorDirection:int):GenericTreeLayouter_SubtreeShape
[override] Places the shapes of the children using the two node placers getUpperLeftChildren() and getLowerRightChildren().
DelegatingNodePlacer
 Inherited
[static] Translates a "real world point" to a "model point"
AbstractRotatableNodePlacer
Protected Methods
 MethodDefined By
 Inherited
createRootNodeShape(node:Node):SubtreeShapeRotated
Convenience method that queries the DataProvider for the shape of a single node as a SubtreeShape instance.
AbstractRotatableNodePlacer
 Inherited
createSubtreeShape(node:Node):SubtreeShapeRotated
Convenience method that queries the DataProvider for a SubtreeShape.
AbstractRotatableNodePlacer
  
[override]
DelegatingNodePlacer
  
Determines the lower right children of the specified root node.
DelegatingNodePlacer
 Inherited
Lookup method to get the PortConstraint for the local root translated.
AbstractRotatableNodePlacer
 Inherited
Translates the absolute source point of the given edge to the "view coordinates" (translated by the modification matrix)
AbstractRotatableNodePlacer
  
Determines the upper left children of the specified root node.
DelegatingNodePlacer
 Inherited
AbstractRotatableNodePlacer
  
initDelegatingNodePlacer(modificationMatrix:AbstractRotatableNodePlacer_Matrix, placerUpperLeft:NodePlacer, placerLowerRight:NodePlacer):void
Initializes this object.
DelegatingNodePlacer
  
placeSubtreeCore(localRoot:Node, parentConnectorDirection:int):SubtreeShapeRotated
[override]
DelegatingNodePlacer
 Inherited
translateDirectionToModel(realDirection:int):int
Translates a "real" direction into a directionModel direction
AbstractRotatableNodePlacer
 Inherited
translateDirectionToReal(modelDirection:int):int
Translates a modelDirectionModel into the "real" directionModel
AbstractRotatableNodePlacer
Public Constants
 ConstantDefined By
  HORIZONTAL : int
[static] Orientation specifier.
DelegatingNodePlacer
  LEFT_RIGHT_DPKEY : Object = y.layout.tree.DelegatingNodePlacer.LEFT_RIGHT_DPKEY
[static] Key which can be used to register a data provider that tells the node placer whether the node shall be placed on the left or right side.
DelegatingNodePlacer
  VERTICAL : int
[static] Orientation specifier.
DelegatingNodePlacer
Property Detail
orientationproperty
orientation:int

Specifies the orientation according to which node shapes are aligned by this placer. Depending on the orientation the shapes are aligned on the x- or y-axis.


Implementation
    public function get orientation():int
    public function set orientation(value:int):void

See also

placerLowerRightproperty 
placerLowerRight:NodePlacer  [read-only]

Returns the NodePlacer that is used to layout the nodes on the "lower right"


Implementation
    public function get placerLowerRight():NodePlacer
placerUpperLeftproperty 
placerUpperLeft:NodePlacer  [read-only]

Returns the NodePlacer that is used to layout the nodes on the "upper left"


Implementation
    public function get placerUpperLeft():NodePlacer
Constructor Detail
DelegatingNodePlacer()Constructor
public function DelegatingNodePlacer(modificationMatrix:AbstractRotatableNodePlacer_Matrix, placerUpperLeft:NodePlacer, placerLowerRight:NodePlacer, init:Boolean = true)

Creates a new instance using the given modification matrix an the node placers "this" delegates to.

Parameters
modificationMatrix:AbstractRotatableNodePlacer_Matrix
 
placerUpperLeft:NodePlacer
 
placerLowerRight:NodePlacer
 
init: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.
Method Detail
createProcessor()method
override public function createProcessor(layouter:GenericTreeLayouter, graph:LayoutGraph, currentRoot:Node):Processor

Creates a processor that partitions child nodes of the specified root node into two subsets, one to be arranged by the "upper left" NodePlacer and one to be arranged by the "lower right" NodePlacer.

Parameters

layouter:GenericTreeLayouter
 
graph:LayoutGraph
 
currentRoot:Node

Returns
Processor

See also

determineChildConnector()method 
override protected function determineChildConnector(child:Node):int

Parameters

child:Node

Returns
int
determineChildConnectors()method 
override public function determineChildConnectors(localRoot:Node, connectorMap:DataMap):void

Parameters

localRoot:Node
 
connectorMap:DataMap

getClass()method 
override public function getClass():Class

Returns
Class
getLowerRightChildren()method 
protected function getLowerRightChildren(localRoot:Node, graph:LayoutGraph):NodeList

Determines the lower right children of the specified root node. Data provider LEFT_RIGHT_DPKEY is used to determine on which side a node is placed. If no provider is specified, the first half of the nodes get placed on the left, the others on the right side These nodes are placed using the NodePlacer returned by placerLowerRight.

Parameters

localRoot:Node
 
graph:LayoutGraph

Returns
NodeList — a NodeList containing the lower right nodes.

See also

getUpperLeftChildren()method 
protected function getUpperLeftChildren(localRoot:Node, graph:LayoutGraph):NodeList

Determines the upper left children of the specified root node. Data provider LEFT_RIGHT_DPKEY is used to determine on which side a node is placed. If no provider is specified, the first half of the nodes get placed on the left, the others on the right side These nodes are placed using the NodePlacer returned by placerUpperLeft.

Parameters

localRoot:Node
 
graph:LayoutGraph

Returns
NodeList — a NodeList containing the upper left nodes.

See also

initDelegatingNodePlacer()method 
protected final function initDelegatingNodePlacer(modificationMatrix:AbstractRotatableNodePlacer_Matrix, placerUpperLeft:NodePlacer, placerLowerRight:NodePlacer):void

Initializes this object. See the documentation of the corresponding factory method newDelegatingNodePlacer() for details.

Parameters

modificationMatrix:AbstractRotatableNodePlacer_Matrix
 
placerUpperLeft:NodePlacer
 
placerLowerRight:NodePlacer

See also

newDelegatingNodePlacer()method 
public static function newDelegatingNodePlacer(modificationMatrix:AbstractRotatableNodePlacer_Matrix, placerUpperLeft:NodePlacer, placerLowerRight:NodePlacer):DelegatingNodePlacer

Creates a new instance using the given modification matrix an the node placers "this" delegates to.

Parameters

modificationMatrix:AbstractRotatableNodePlacer_Matrix
 
placerUpperLeft:NodePlacer
 
placerLowerRight:NodePlacer

Returns
DelegatingNodePlacer
placeSubtree()method 
override public function placeSubtree(nodeShapeProvider:DataProvider, subtreeShapeProvider:DataProvider, graph:LayoutGraph, localRoot:Node, parentConnectorDirection:int):GenericTreeLayouter_SubtreeShape

Places the shapes of the children using the two node placers getUpperLeftChildren() and getLowerRightChildren().

Parameters

nodeShapeProvider:DataProvider
 
subtreeShapeProvider:DataProvider
 
graph:LayoutGraph
 
localRoot:Node
 
parentConnectorDirection:int

Returns
GenericTreeLayouter_SubtreeShape — the subtree shape for the given local root.

See also

placeSubtreeCore()method 
override protected function placeSubtreeCore(localRoot:Node, parentConnectorDirection:int):SubtreeShapeRotated

Parameters

localRoot:Node
 
parentConnectorDirection:int

Returns
SubtreeShapeRotated
Constant Detail
HORIZONTALConstant
public static const HORIZONTAL:int

Orientation specifier. Node shapes will be aligned on the x-axis.

See also

LEFT_RIGHT_DPKEYConstant 
public static const LEFT_RIGHT_DPKEY:Object = y.layout.tree.DelegatingNodePlacer.LEFT_RIGHT_DPKEY

Key which can be used to register a data provider that tells the node placer whether the node shall be placed on the left or right side. If no provider is specified, the first half of the nodes placed on the left, the others on the right side The provider should return true if the node shall be placed on the left side.

VERTICALConstant 
public static const VERTICAL:int

Orientation specifier. Node shapes will be aligned on the y-axis.

See also