Packagecom.yworks.yfiles.layout.tree
Classpublic class HVTreeLayouter
InheritanceHVTreeLayouter Inheritance CanonicMultiStageLayouter Inheritance YObject Inheritance Object

This tree layouter allows to layout a tree such that each subgraph rooted at a node can either have a horizontal or vertical layout.

Here is an sample output of the layouter



Public Properties
 PropertyDefined By
  comparator : Comparator
Specifies the java.util.Comparator that will be used to sort the outgoing edges (com.yworks.yfiles.base.Node.sortOutEdges()) of each local root in the tree before they are being arranged.
HVTreeLayouter
 InheritedcomponentLayouter : LayoutStage
Specifies the LayoutStage responsible for laying out the connected components of the graph.
CanonicMultiStageLayouter
 InheritedcomponentLayouterEnabled : Boolean
Getter: Returns whether or not ComponentLayouter is enabled.
CanonicMultiStageLayouter
 InheritedgroupNodeHider : LayoutStage
Specifies the LayoutStage that is responsible for hiding away grouping information for the layout algorithm.
CanonicMultiStageLayouter
 InheritedhideGroupNodes : Boolean
Specifies whether or not to hide away group nodes before the layout begins.
CanonicMultiStageLayouter
  horizontalSpace : Number
Specifies the horizontal distance between adjacent nodes.
HVTreeLayouter
 InheritedlabelLayouter : LayoutStage
Getter: Returns the algorithm used for placing labels.
CanonicMultiStageLayouter
 InheritedlabelLayouterEnabled : Boolean
Getter: Returns whether or not LabelLayouter is enabled.
CanonicMultiStageLayouter
 InheritedlayoutOrientation : int
Specifies the main layout orientation.
CanonicMultiStageLayouter
 InheritedorientationLayouter : LayoutStage
Specifies the LayoutStage that is responsible for changing the orientation of the computed layout.
CanonicMultiStageLayouter
 InheritedorientationLayouterEnabled : Boolean
Getter: Returns whether or not the OrientationLayouter is enabled.
CanonicMultiStageLayouter
 InheritedparallelEdgeLayouter : LayoutStage
Getter: Returns the LayoutStage responsible for routing parallel edges.
CanonicMultiStageLayouter
 InheritedparallelEdgeLayouterEnabled : Boolean
Getter: Returns whether or not the ParallelEdgeLayouter is enabled.
CanonicMultiStageLayouter
 InheritedselfLoopLayouter : LayoutStage
Getter: Returns the LayoutStage used for routing Self-loops.
CanonicMultiStageLayouter
 InheritedselfLoopLayouterEnabled : Boolean
Getter: Returns whether or not the SelfLoopLayouter is enabled.
CanonicMultiStageLayouter
 InheritedsubgraphLayouter : LayoutStage
Specifies the LayoutStage that is responsible for constraining the layout process to a subgraph of the target graph.
CanonicMultiStageLayouter
 InheritedsubgraphLayouterEnabled : Boolean
Getter: Returns whether or not the SubgraphLayouter is enabled.
CanonicMultiStageLayouter
  verticalSpace : Number
Specifies the vertical distance between adjacent nodes.
HVTreeLayouter
Protected Properties
 PropertyDefined By
  graph : LayoutGraph
The layout graph being acted upon.
HVTreeLayouter
Public Methods
 MethodDefined By
  
HVTreeLayouter(init:Boolean = true)
HVTreeLayouter
 Inherited
Appends a stage to the layout pipeline.
CanonicMultiStageLayouter
 Inherited
Returns a layout for the given layout graph.
CanonicMultiStageLayouter
 Inherited
Returns a layout for the given graph interface and layout.
CanonicMultiStageLayouter
 Inherited
canLayout(graph:LayoutGraph):Boolean
Tests whether or not the given graph can be laid out by this layouter.
CanonicMultiStageLayouter
  
canLayoutCore(graph:LayoutGraph):Boolean
[override] The core layouter can layout trees.
HVTreeLayouter
 Inherited
doLayout(layoutGraph:LayoutGraph):void
Calculates a layout for the given graph.
CanonicMultiStageLayouter
 Inherited
Calculates a layout for the given graph interface and layout.
CanonicMultiStageLayouter
  
[override] Core layout routine.
HVTreeLayouter
 Inherited
Disables all layout stages and performs only the core layouter.
CanonicMultiStageLayouter
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
HVTreeLayouter
 Inherited
hashCode():int
YObject
  
[static]
HVTreeLayouter
 Inherited
Prepends a stage to the layout pipeline.
CanonicMultiStageLayouter
 Inherited
Removes a LayoutStage that has been previously added by the methods appendStage() or prependStage().
CanonicMultiStageLayouter
Protected Methods
 MethodDefined By
 Inherited
checkGroupNodeSize(layout:GraphLayout, node:Object):void
This method throws an com.yworks.bridge.util.IllegalArgumentException if the width/height of the given group node object is zero.
CanonicMultiStageLayouter
 Inherited
checkNodeSize(layout:GraphLayout, node:Object):void
This method throws an com.yworks.bridge.util.IllegalArgumentException if the width/height of the given node object is zero.
CanonicMultiStageLayouter
  
HVTreeLayouter
 Inherited
CanonicMultiStageLayouter
  
Initializes this object.
HVTreeLayouter
  
Returns whether or not the subtree rooted at the given node should be laid out horizontally.
HVTreeLayouter
  
isVerticalRoot(v:Node):Boolean
Returns whether or not the subtree rooted at the given node should be laid out vertically.
HVTreeLayouter
Public Constants
 ConstantDefined By
  HORIZONTAL_SUBTREE : Object = y.layout.tree.HVTreeLayouter.HORIZONTAL_SUBTREE
[static] Subtree orientation specifier.
HVTreeLayouter
  SUBTREE_ORIENTATION : Object = y.layout.tree.HVTreeLayouter.SUBTREE_ORIENTATION
[static] The data provider key used to specify the subtree orientation of each node in the tree.
HVTreeLayouter
  VERTICAL_SUBTREE : Object = y.layout.tree.HVTreeLayouter.VERTICAL_SUBTREE
[static] Subtree orientation specifier.
HVTreeLayouter
Property Detail
comparatorproperty
comparator:Comparator

Specifies the java.util.Comparator that will be used to sort the outgoing edges (com.yworks.yfiles.base.Node.sortOutEdges()) of each local root in the tree before they are being arranged. The default value is null which indicates that the algorithm should use its built-in logic.


Implementation
    public function get comparator():Comparator
    public function set comparator(value:Comparator):void

See also

java.util.Comparator
outgoing edges
graphproperty 
protected var graph:LayoutGraph

The layout graph being acted upon.

horizontalSpaceproperty 
horizontalSpace:Number

Specifies the horizontal distance between adjacent nodes. By default a value of 10 is set.


Implementation
    public function get horizontalSpace():Number
    public function set horizontalSpace(value:Number):void
verticalSpaceproperty 
verticalSpace:Number

Specifies the vertical distance between adjacent nodes. By default a value of 10 is set.


Implementation
    public function get verticalSpace():Number
    public function set verticalSpace(value:Number):void
Constructor Detail
HVTreeLayouter()Constructor
public function HVTreeLayouter(init:Boolean = true)

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
canLayoutCore()method
override public function canLayoutCore(graph:LayoutGraph):Boolean

The core layouter can layout trees.

Parameters

graph:LayoutGraph

Returns
Boolean
doLayoutCore()method 
override public function doLayoutCore(graph:LayoutGraph):void

Core layout routine.

Parameters

graph:LayoutGraph

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

Returns
Class
getSuccessors()method 
protected function getSuccessors(localParent:Node):NodeCursor

Parameters

localParent:Node

Returns
NodeCursor
initHVTreeLayouter()method 
protected final function initHVTreeLayouter():void

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

See also

isHorizontalRoot()method 
protected function isHorizontalRoot(v:Node):Boolean

Returns whether or not the subtree rooted at the given node should be laid out horizontally.

Parameters

v:Node

Returns
Boolean
isVerticalRoot()method 
protected function isVerticalRoot(v:Node):Boolean

Returns whether or not the subtree rooted at the given node should be laid out vertically.

Parameters

v:Node

Returns
Boolean
newHVTreeLayouter()method 
public static function newHVTreeLayouter():HVTreeLayouter

Returns
HVTreeLayouter
Constant Detail
HORIZONTAL_SUBTREEConstant
public static const HORIZONTAL_SUBTREE:Object = y.layout.tree.HVTreeLayouter.HORIZONTAL_SUBTREE

Subtree orientation specifier. This specifier indicated that the subtree rooted at the associated node should be laid out horizontally.

SUBTREE_ORIENTATIONConstant 
public static const SUBTREE_ORIENTATION:Object = y.layout.tree.HVTreeLayouter.SUBTREE_ORIENTATION

The data provider key used to specify the subtree orientation of each node in the tree. This layout algorithm will try to retrieve a data provider from the tree to be laid out with this key. The looked up data provider should provide either HORIZONTAL_SUBTREE, VERTICAL_SUBTREE

See also

VERTICAL_SUBTREEConstant 
public static const VERTICAL_SUBTREE:Object = y.layout.tree.HVTreeLayouter.VERTICAL_SUBTREE

Subtree orientation specifier. This specifier indicated that the subtree rooted at the associated node should be laid out vertically.