Packagecom.yworks.yfiles.layout.tree
Classpublic class LeftRightPlacer
InheritanceLeftRightPlacer Inheritance AbstractRotatableNodePlacer Inheritance YObject Inheritance Object

The LeftRightPlacer is a NodePlacer that arranges the Nodes on the left and right side of a vertical bus.



Public Properties
 PropertyDefined By
  horizontalDistance : Number
Specifies the horizontal distance/spacing between subtree shapes.
LeftRightPlacer
 InheritedmodificationMatrix : AbstractRotatableNodePlacer_Matrix
[read-only] The actual modification matrix
AbstractRotatableNodePlacer
  placeLastOnBottom : Boolean
Specifies whether or not the last child is placed at the bottom of the other.
LeftRightPlacer
  spacing : Number
[override] Specifies the spacing between subtrees this NodePlacer is arranging.
LeftRightPlacer
  verticalDistance : Number
Specifies the vertical distance/spacing between subtree shapes.
LeftRightPlacer
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
  
LeftRightPlacer(init:Boolean = true)
Creates a LeftRightPlacer with the default modificationMatrix.
LeftRightPlacer
  
[override] Returns a comparator for edges.
LeftRightPlacer
 Inherited
AbstractRotatableNodePlacer
 Inherited
Creates an optional Processor for pre- and post-processing.
AbstractRotatableNodePlacer
  
determineChildConnectors(localRoot:Node, connectorMap:DataMap):void
[override] Determines the direction the children should place their connectors.
LeftRightPlacer
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
LeftRightPlacer
 Inherited
hashCode():int
YObject
  
[static] Creates a LeftRightPlacer with the default modificationMatrix.
LeftRightPlacer
  
[static] Creates a LeftRightPlacer with the given modificationMatrix.
LeftRightPlacer
 Inherited
placeSubtree(nodeShapeProvider:DataProvider, subtreeShapeProvider:DataProvider, graph:LayoutGraph, localRoot:Node, parentConnectorDirection:int):GenericTreeLayouter_SubtreeShape
This method initializes the local data structures and then delegates the work to the abstract variant.
AbstractRotatableNodePlacer
 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] Throws IllegalStateException, should not be reached.
LeftRightPlacer
 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
 Inherited
AbstractRotatableNodePlacer
  
Initializes this object.
LeftRightPlacer
  
Initializes this object.
LeftRightPlacer
  
placeSubtreeCore(localRoot:Node, parentConnectorDirection:int):SubtreeShapeRotated
[override] Places the shapes of the children on the left and right side of a vertical bus.
LeftRightPlacer
 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
  LEFT_RIGHT_DPKEY : Object = y.layout.tree.LeftRightPlacer.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.
LeftRightPlacer
Property Detail
horizontalDistanceproperty
horizontalDistance:Number

Specifies the horizontal distance/spacing between subtree shapes.

By default, a value of 20 is used.


Implementation
    public function get horizontalDistance():Number
    public function set horizontalDistance(value:Number):void

See also

placeLastOnBottomproperty 
placeLastOnBottom:Boolean

Specifies whether or not the last child is placed at the bottom of the other.

By default, this feature is enabled.


Implementation
    public function get placeLastOnBottom():Boolean
    public function set placeLastOnBottom(value:Boolean):void
spacingproperty 
spacing:Number[override]

Specifies the spacing between subtrees this NodePlacer is arranging. Calls


Implementation
    public function get spacing():Number
    public function set spacing(value:Number):void

See also

verticalDistanceproperty 
verticalDistance:Number

Specifies the vertical distance/spacing between subtree shapes.

By default, a value of 20 is used.


Implementation
    public function get verticalDistance():Number
    public function set verticalDistance(value:Number):void

See also

Constructor Detail
LeftRightPlacer()Constructor
public function LeftRightPlacer(init:Boolean = true)

Creates a LeftRightPlacer with the default modificationMatrix.

Parameters
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
createComparator()method
override public function createComparator():Comparator

Returns a comparator for edges. The comparator applies the modification matrix of the com.yworks.yfiles.layout.tree.LeftRightPlacer and returns

Returns
Comparator

See also

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

Throws IllegalStateException, should not be reached.

Parameters

child:Node

Returns
int

Throws
Error — always.
determineChildConnectors()method 
override public function determineChildConnectors(localRoot:Node, connectorMap:DataMap):void

Determines the direction the children should place their connectors.

Parameters

localRoot:Node
 
connectorMap:DataMap

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

Returns
Class
initLeftRightPlacer1()method 
protected final function initLeftRightPlacer1():void

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

See also

initLeftRightPlacer2()method 
protected final function initLeftRightPlacer2(modificationMatrix:AbstractRotatableNodePlacer_Matrix):void

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

Parameters

modificationMatrix:AbstractRotatableNodePlacer_Matrix

See also

newLeftRightPlacer1()method 
public static function newLeftRightPlacer1():LeftRightPlacer

Creates a LeftRightPlacer with the default modificationMatrix.

Returns
LeftRightPlacer
newLeftRightPlacer2()method 
public static function newLeftRightPlacer2(modificationMatrix:AbstractRotatableNodePlacer_Matrix):LeftRightPlacer

Creates a LeftRightPlacer with the given modificationMatrix.

Parameters

modificationMatrix:AbstractRotatableNodePlacer_Matrix

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

Places the shapes of the children on the left and right side of a vertical bus.

Parameters

localRoot:Node
 
parentConnectorDirection:int

Returns
SubtreeShapeRotated — the new subtree shape
Constant Detail
LEFT_RIGHT_DPKEYConstant
public static const LEFT_RIGHT_DPKEY:Object = y.layout.tree.LeftRightPlacer.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 nodes will be placed alternating from left to right. The provider should return true if the node shall be placed on the left side.