Package | com.yworks.yfiles.layout.hierarchic |
Class | public class HierarchicLayouter |
Inheritance | HierarchicLayouter CanonicMultiStageLayouter YObject Object |
Subclasses | HierarchicGroupLayouter |
See also
Property | Defined By | ||
---|---|---|---|
bendReductionThreshold : int
Specifies the limit, when bends are removed and a straight line is drawn instead. | HierarchicLayouter | ||
componentLayouter : LayoutStage
Specifies the LayoutStage responsible for laying out the connected components of the graph. | CanonicMultiStageLayouter | ||
componentLayouterEnabled : Boolean
Getter:
Returns whether or not ComponentLayouter is enabled. | CanonicMultiStageLayouter | ||
drawer : Drawer
Specifies the Drawer, which is responsible for the third phase of the algorithm. | HierarchicLayouter | ||
groupNodeHider : LayoutStage
Specifies the LayoutStage that is responsible for hiding away grouping information for the layout algorithm. | CanonicMultiStageLayouter | ||
hideGroupNodes : Boolean
Specifies whether or not to hide away group nodes before the layout begins. | CanonicMultiStageLayouter | ||
labelLayouter : LayoutStage
Getter:
Returns the algorithm used for placing labels. | CanonicMultiStageLayouter | ||
labelLayouterEnabled : Boolean
Getter:
Returns whether or not LabelLayouter is enabled. | CanonicMultiStageLayouter | ||
layerer : OldLayerer
Specifies the Layerer, which is responsible for the first phase of the algorithm. | HierarchicLayouter | ||
layeringStrategy : int
Getter:
Returns the currently set layering strategy. | HierarchicLayouter | ||
layerSequencer : LayerSequencer
Specifies the LayerSequencer, which is responsible for the second phase of the algorithm. | HierarchicLayouter | ||
layoutOrientation : int
Specifies the main layout orientation. | CanonicMultiStageLayouter | ||
layoutStyle : int
Getter:
Returns the currently set layout style or -1 if the style cannot be determined
Setter:
Sets the layout style for this layouter. | HierarchicLayouter | ||
maximalDuration : uint
Specifies a time limit for the algorithm in milliseconds
| HierarchicLayouter | ||
mementoSupport : MementoSupport [read-only]
Gets the cookie for the memento support of the hierarchic layout algorithm. | HierarchicLayouter | ||
minimalEdgeDistance : Number
Specifies the minimal distance between edges that run in parallel. | HierarchicLayouter | ||
minimalFirstSegmentLength : Number
Specifies the minimal length of first and last edge segments for edge routing. | HierarchicLayouter | ||
minimalLayerDistance : Number
Specifies the minimal distance between two layers. | HierarchicLayouter | ||
minimalNodeDistance : Number
Specifies the minimal distance between two nodes in the same layer. | HierarchicLayouter | ||
optimizePortConstraints : Boolean
Specifies whether the algorithm should try to optimize PortConstraints, that are either com.yworks.yfiles.layout.PortConstraint.ANY_SIDE or null. | HierarchicLayouter | ||
optimizeSameLayerEdgeRouting : Boolean
Getter:
Returns whether the algorithm tries to optimize the routing of same layer edges whose PortConstraints don't impose the routing. | HierarchicLayouter | ||
orientationLayouter : LayoutStage
Specifies the LayoutStage that is responsible for changing the orientation of the computed layout. | CanonicMultiStageLayouter | ||
orientationLayouterEnabled : Boolean
Getter:
Returns whether or not the OrientationLayouter is enabled. | CanonicMultiStageLayouter | ||
parallelEdgeLayouter : LayoutStage
Getter:
Returns the LayoutStage responsible for routing parallel edges. | CanonicMultiStageLayouter | ||
parallelEdgeLayouterEnabled : Boolean
Getter:
Returns whether or not the ParallelEdgeLayouter is enabled. | CanonicMultiStageLayouter | ||
removeFalseCrossings : Boolean
Specifies whether or not false crossings should be removed from the layout. | HierarchicLayouter | ||
routingStyle : int
Getter:
Returns the routing style being used. | HierarchicLayouter | ||
selfLoopLayouter : LayoutStage
Getter:
Returns the LayoutStage used for routing Self-loops. | CanonicMultiStageLayouter | ||
selfLoopLayouterEnabled : Boolean
Getter:
Returns whether or not the SelfLoopLayouter is enabled. | CanonicMultiStageLayouter | ||
subgraphLayouter : LayoutStage
Specifies the LayoutStage that is responsible for constraining the layout process to a subgraph of the target graph. | CanonicMultiStageLayouter | ||
subgraphLayouterEnabled : Boolean
Getter:
Returns whether or not the SubgraphLayouter is enabled. | CanonicMultiStageLayouter |
Method | Defined By | ||
---|---|---|---|
HierarchicLayouter(init:Boolean = true)
Instantiates a new HierarchicLayouter. | HierarchicLayouter | ||
appendStage(stage:LayoutStage):void
Appends a stage to the layout pipeline. | CanonicMultiStageLayouter | ||
Returns a layout for the given layout graph. | CanonicMultiStageLayouter | ||
Returns a layout for the given graph interface and layout. | CanonicMultiStageLayouter | ||
canLayout(graph:LayoutGraph):Boolean
Tests whether or not the given graph can be laid out by this layouter. | CanonicMultiStageLayouter | ||
canLayoutCore(graph:LayoutGraph):Boolean [override]
Always returns true. | HierarchicLayouter | ||
disposeMementoSupport():void
Disposes the memento support if it is existent, i.e. | HierarchicLayouter | ||
doLayout(layoutGraph:LayoutGraph):void
Calculates a layout for the given graph. | CanonicMultiStageLayouter | ||
Calculates a layout for the given graph interface and layout. | CanonicMultiStageLayouter | ||
doLayoutCore(g:LayoutGraph):void [override]
Layout the given graph. | HierarchicLayouter | ||
enableOnlyCore():void
Disables all layout stages and performs only the core layouter. | CanonicMultiStageLayouter | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | HierarchicLayouter | ||
hashCode():int | YObject | ||
[static]
Instantiates a new HierarchicLayouter. | HierarchicLayouter | ||
prependStage(stage:LayoutStage):void
Prepends a stage to the layout pipeline. | CanonicMultiStageLayouter | ||
removeStage(stage:LayoutStage):void
Removes a LayoutStage that has been previously added by the methods appendStage() or prependStage(). | CanonicMultiStageLayouter |
Method | Defined By | ||
---|---|---|---|
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 | ||
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 | ||
Determines the order of the nodes within their layers. | HierarchicLayouter | ||
CanonicMultiStageLayouter | |||
initHierarchicLayouter():void
Initializes this object. | HierarchicLayouter |
Constant | Defined By | ||
---|---|---|---|
LAYERING_BFS : int = 4 [static]
Layering strategy specifier. | HierarchicLayouter | ||
LAYERING_FROM_SKETCH : int = 5 [static]
Layering strategy specifier. | HierarchicLayouter | ||
LAYERING_HIERARCHICAL_DOWNSHIFT : int = 3 [static]
Layering strategy specifier. | HierarchicLayouter | ||
LAYERING_HIERARCHICAL_OPTIMAL : int = 1 [static]
Layering strategy specifier. | HierarchicLayouter | ||
LAYERING_HIERARCHICAL_TIGHT_TREE : int = 2 [static]
Layering strategy specifier. | HierarchicLayouter | ||
LAYERING_HIERARCHICAL_TOPMOST : int = 0 [static]
Layering strategy specifier. | HierarchicLayouter | ||
LAYERING_STRATEGY_UNKNOWN : int = -1 [static]
Dummy layering strategy specifier. | HierarchicLayouter | ||
LAYERING_USER_DEFINED : int = 6 [static]
Layering strategy specifier. | HierarchicLayouter | ||
LINEAR_SEGMENTS : int = 1 [static]
Layout style specifier. | HierarchicLayouter | ||
MEDIAN_SIMPLEX : int = 5 [static]
Layout style specifier. | HierarchicLayouter | ||
PENDULUM : int = 0 [static]
Layout style specifier. | HierarchicLayouter | ||
POLYLINE : int = 2 [static]
Layout style specifier. | HierarchicLayouter | ||
ROUTE_ORTHOGONAL : int = 1 [static]
Edge routing style specifier. | HierarchicLayouter | ||
ROUTE_POLYLINE : int = 0 [static]
Edge routing style specifier. | HierarchicLayouter | ||
SIMPLEX : int = 4 [static]
Layout style specifier. | HierarchicLayouter | ||
TREE : int = 3 [static]
Layout style specifier. | HierarchicLayouter |
bendReductionThreshold | property |
bendReductionThreshold:int
Specifies the limit, when bends are removed and a straight line is drawn instead.
public function get bendReductionThreshold():int
public function set bendReductionThreshold(value:int):void
drawer | property |
drawer:Drawer
Specifies the Drawer
, which is responsible for the third phase of the algorithm.
The Drawer
is responsible for the layout style of this layouter.
public function get drawer():Drawer
public function set drawer(value:Drawer):void
layerer | property |
layerer:OldLayerer
Specifies the Layerer
, which is responsible for the first phase of the algorithm.
public function get layerer():OldLayerer
public function set layerer(value:OldLayerer):void
layeringStrategy | property |
layeringStrategy:int
Getter: Returns the currently set layering strategy.
Setter: Sets a predefined layering strategy. This layouter assigns the nodes to separate layers. The nodes within each layer will be placed on the same horizontal line. The layers will be arranged vertically starting with the small-numbered layers. The rank of a node is the number of the layer it belongs to. An important layering strategy for the hierarchic layout style is called Hierarchical Layering. A hierarchical layering tries to assign nodes to layers in a way that as much as possible edges of the graph will point to the main layout direction, i.e. the start nodes of the edges will have a smaller rank than the corresponding end nodes. Also, a hierarchical layering will never put two connected nodes in the same layer. By default the layering strategy LAYERING_HIERARCHICAL_TIGHT_TREE is set. public function get layeringStrategy():int
public function set layeringStrategy(value:int):void
See also
layerSequencer | property |
layerSequencer:LayerSequencer
Specifies the LayerSequencer
, which is responsible for the second phase of the algorithm.
public function get layerSequencer():LayerSequencer
public function set layerSequencer(value:LayerSequencer):void
layoutStyle | property |
layoutStyle:int
Getter:
Returns the currently set layout style or -1
if the style cannot be determined
public function get layoutStyle():int
public function set layoutStyle(value:int):void
See also
maximalDuration | property |
maximalDuration:uint
Specifies a time limit for the algorithm in milliseconds
public function get maximalDuration():uint
public function set maximalDuration(value:uint):void
mementoSupport | property |
mementoSupport:MementoSupport
[read-only] Gets the cookie for the memento support of the hierarchic layout algorithm. If there was no memento support registered with this instance before, this call will instantiate the memento support, otherwise the existing instance will be returned.
public function get mementoSupport():MementoSupport
minimalEdgeDistance | property |
minimalEdgeDistance:Number
Specifies the minimal distance between edges that run in parallel.
public function get minimalEdgeDistance():Number
public function set minimalEdgeDistance(value:Number):void
minimalFirstSegmentLength | property |
minimalFirstSegmentLength:Number
Specifies the minimal length of first and last edge segments for edge routing. This will be used for orthogonal edge routing, self-loops, same layer edges and bus connectors.
public function get minimalFirstSegmentLength():Number
public function set minimalFirstSegmentLength(value:Number):void
minimalLayerDistance | property |
minimalLayerDistance:Number
Specifies the minimal distance between two layers.
public function get minimalLayerDistance():Number
public function set minimalLayerDistance(value:Number):void
minimalNodeDistance | property |
minimalNodeDistance:Number
Specifies the minimal distance between two nodes in the same layer.
public function get minimalNodeDistance():Number
public function set minimalNodeDistance(value:Number):void
optimizePortConstraints | property |
optimizePortConstraints:Boolean
Specifies whether the algorithm should try to optimize PortConstraints, that are either com.yworks.yfiles.layout.PortConstraint.ANY_SIDE or null
.
Default is false
.
public function get optimizePortConstraints():Boolean
public function set optimizePortConstraints(value:Boolean):void
See also
optimizeSameLayerEdgeRouting | property |
optimizeSameLayerEdgeRouting:Boolean
Getter: Returns whether the algorithm tries to optimize the routing of same layer edges whose PortConstraints don't impose the routing.
Setter: Determines whether the algorithm should try to optimize the routing of same layer edges whose PortConstraints don't impose the routing. Default istrue
.
public function get optimizeSameLayerEdgeRouting():Boolean
public function set optimizeSameLayerEdgeRouting(value:Boolean):void
removeFalseCrossings | property |
removeFalseCrossings:Boolean
Specifies whether or not false crossings should be removed from the layout. A false crossing is a crossing between two edges that connect to the same upper or lower node.
public function get removeFalseCrossings():Boolean
public function set removeFalseCrossings(value:Boolean):void
routingStyle | property |
routingStyle:int
Getter: Returns the routing style being used.
Setter: Sets the edge routing style. Possible values are ROUTE_POLYLINE and ROUTE_ORTHOGONAL. By default ROUTE_POLYLINE is set. public function get routingStyle():int
public function set routingStyle(value:int):void
See also
HierarchicLayouter | () | Constructor |
public function HierarchicLayouter(init:Boolean = true)
Instantiates a new HierarchicLayouter.
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.
|
canLayoutCore | () | method |
override public function canLayoutCore(graph:LayoutGraph):Boolean
Always returns true.
Parameters
graph:LayoutGraph |
Boolean |
disposeMementoSupport | () | method |
public function disposeMementoSupport():void
Disposes the memento support if it is existent, i.e.
if it has been queried before by getMementoSupport()
doLayoutCore | () | method |
override public function doLayoutCore(g:LayoutGraph):void
Layout the given graph.
Parameters
g:LayoutGraph |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getLayerSequence | () | method |
protected function getLayerSequence(g:LayoutGraph, LAYER_KEY:NodeMap, maxLayer:int):Vector.<Object>
Determines the order of the nodes within their layers.
Parameters
g:LayoutGraph | |
LAYER_KEY:NodeMap | |
maxLayer:int |
Vector.<Object> |
initHierarchicLayouter | () | method |
protected final function initHierarchicLayouter():void
Initializes this object. See the documentation of the corresponding factory method newHierarchicLayouter()
for details.
See also
newHierarchicLayouter | () | method |
public static function newHierarchicLayouter():HierarchicLayouter
Instantiates a new HierarchicLayouter.
ReturnsHierarchicLayouter |
LAYERING_BFS | Constant |
public static const LAYERING_BFS:int = 4
Layering strategy specifier. Layering based on a breadth first search (bfs). All edges will span at most one layer in the resulting drawing. Edges between nodes that belong to the same layer are possible. The nodes that will be placed in the first layer can be provided by a data provider bound to the input graph using the key com.yworks.yfiles.layout.hierarchic.BFSLayerer.CORE_NODES. If this data provider is not given, then nodes that have no incoming edges are placed in the first layer.
See also
LAYERING_FROM_SKETCH | Constant |
public static const LAYERING_FROM_SKETCH:int = 5
Layering strategy specifier. A layer assignment strategy that uses the initial y-coordinates of the nodes (x-coordinates when the layout orientation is horizontal) to determine a node layering. It tries to find a layering that is similar to the one in the input graph. When this layering strategy is used, the layouter may place nodes in the same layer, even though they are connected by an edge. These inner layer edges are always routed in an orthogonal style.
See also
LAYERING_HIERARCHICAL_DOWNSHIFT | Constant |
public static const LAYERING_HIERARCHICAL_DOWNSHIFT:int = 3
Layering strategy specifier. A fast heuristic that improves the the ranking done by LAYERING_HIERARCHICAL_TOPMOST by down shifting some nodes in the layering. The quality is usually worse than the one produced by Tight Tree Heuristic.
See also
LAYERING_HIERARCHICAL_OPTIMAL | Constant |
public static const LAYERING_HIERARCHICAL_OPTIMAL:int = 1
Layering strategy specifier. An optimal hierarchical layering strategy. The layer distance of an edge is the absolute difference between the layer numbers of its source and target node. Layer assignment will be done in such a way that the overall sum of the layer distances of all edges in the layout is minimal.
See also
LAYERING_HIERARCHICAL_TIGHT_TREE | Constant |
public static const LAYERING_HIERARCHICAL_TIGHT_TREE:int = 2
Layering strategy specifier. A heuristic that approximates the ranking done by LAYERING_HIERARCHICAL_OPTIMAL.
See also
LAYERING_HIERARCHICAL_TOPMOST | Constant |
public static const LAYERING_HIERARCHICAL_TOPMOST:int = 0
Layering strategy specifier. A simple hierarchical layering variant. All nodes with indegree zero will be assigned to the topmost layer of the layout. The number of separate layers will be as small as possible.
See also
LAYERING_STRATEGY_UNKNOWN | Constant |
public static const LAYERING_STRATEGY_UNKNOWN:int = -1
Dummy layering strategy specifier. Returned by layeringStrategy if the current strategy is not known.
See also
LAYERING_USER_DEFINED | Constant |
public static const LAYERING_USER_DEFINED:int = 6
Layering strategy specifier. The ranks of the nodes will be given by the user. The node ranks must be provided by a data provider bound to the input graph using the key com.yworks.yfiles.layout.hierarchic.GivenLayersLayerer.LAYER_ID_KEY . Like LAYERING_FROM_SKETCH this layering allows inner layer edges.
See also
LINEAR_SEGMENTS | Constant |
public static const LINEAR_SEGMENTS:int = 1
Layout style specifier. Draws the edges in a way that at most two bends are used per edge unless two edges cross.
MEDIAN_SIMPLEX | Constant |
public static const MEDIAN_SIMPLEX:int = 5
Layout style specifier. Similar to SIMPLEX but more symmetric for the cost of a few more bends.
PENDULUM | Constant |
public static const PENDULUM:int = 0
Layout style specifier. Draws the edges in a way that nodes are balanced nicely and the number of bends on an edge is kept small.
Note that this layout style is more time consuming than most of the other ones.POLYLINE | Constant |
public static const POLYLINE:int = 2
Layout style specifier. Draws the edges in a polyline fashion. The layout tends to be very compact but the number of edge bends may be high.
ROUTE_ORTHOGONAL | Constant |
public static const ROUTE_ORTHOGONAL:int = 1
Edge routing style specifier. Routes the edges orthogonally, i.e. all edge segments are either vertically or horizontally aligned.
ROUTE_POLYLINE | Constant |
public static const ROUTE_POLYLINE:int = 0
Edge routing style specifier. Routes the edges as polylines.
SIMPLEX | Constant |
public static const SIMPLEX:int = 4
Layout style specifier. Gives tight layouts with rather few bends.
TREE | Constant |
public static const TREE:int = 3
Layout style specifier. Gives nice layouts if the graph is a tree.