Packagecom.yworks.yfiles.layout.hierarchic.incremental
Classpublic class HierarchicLayouterImpl
InheritanceHierarchicLayouterImpl Inheritance CanonicMultiStageLayouter Inheritance YObject Inheritance Object

This class can be used to create hierarchical layouts of graphs. It has built-in support for incrementally adding elements to a previously calculated layout or optimizing existing elements of a previously calculated layout.

In order to customize this layout algorithm, modify the Layerer (layerer), Sequencer (sequencer), PortAllocator (portAllocator), DrawingDistanceCalculator (drawingDistanceCalculator), and NodePlacer (nodePlacer) instances.

Use the INCREMENTAL_HINTS_DPKEY com.yworks.yfiles.base.DataProvider key to associate incremental hints with the elements in the graph. Incremental Hints can be obtained from the IncrementalHintsFactory (createIncrementalHintsFactory()). They are used by the algorithm to determine which elements in the graph have to be inserted/updated incrementally.

This layout algorithm respects com.yworks.yfiles.layout.PortConstraint s, that are bound to the graph using the com.yworks.yfiles.layout.PortConstraintKeys.SOURCE_PORT_CONSTRAINT_KEY and com.yworks.yfiles.layout.PortConstraintKeys.TARGET_PORT_CONSTRAINT_KEY as well as com.yworks.yfiles.layout.PortConstraintKeys.SOURCE_GROUPID_KEY and com.yworks.yfiles.layout.PortConstraintKeys.TARGET_GROUPID_KEY DataProviders that can be used to create bus-like edge routings.

Fine-grained configuration of the layout style is supported via DataProviders that are bound to the graph using the EDGE_LAYOUT_DESCRIPTOR_DPKEY and NODE_LAYOUT_DESCRIPTOR_DPKEY DataProvider keys. They can be used to associate com.yworks.yfiles.layout.hierarchic.incremental.NodeLayoutDescriptor and com.yworks.yfiles.layout.hierarchic.incremental.EdgeLayoutDescriptor instances with each element in the graph. These may be shared.

This algorithm sets a com.yworks.yfiles.layout.LabelLayoutTranslator instance as the current com.yworks.yfiles.layout.CanonicMultiStageLayouter.labelLayouter and configures it so that the node labels are passed to by setting com.yworks.yfiles.layout.LabelLayoutTranslator.translateNodeLabels to true. In order to enable integrated edge labeling of this algorithm, make sure com.yworks.yfiles.layout.LabelLayoutTranslator is registered and edge labels are being translated and written back after the layout.

This algorithm also support swimlane style drawings. This can be enabled by associating com.yworks.yfiles.layout.hierarchic.incremental.SwimLaneDescriptor instances with the nodes in the graph using the SWIMLANE_DESCRIPTOR_DPKEY DataProvider key.

Moreover, this algorithm supports sequence constraints. These constraints can be specified using a com.yworks.yfiles.layout.hierarchic.incremental.SequenceConstraintFactory.

See also

com.yworks.yfiles.layout.hierarchic.IncrementalHierarchicLayouter
com.yworks.yfiles.layout.hierarchic.incremental.Layerer
com.yworks.yfiles.layout.hierarchic.incremental.Sequencer
com.yworks.yfiles.layout.hierarchic.incremental.PortAllocator
com.yworks.yfiles.layout.hierarchic.incremental.DrawingDistanceCalculator
com.yworks.yfiles.layout.hierarchic.incremental.NodePlacer
Layerer
Sequencer
PortAllocator
DrawingDistanceCalculator
NodePlacer
INCREMENTAL_HINTS_DPKEY
com.yworks.yfiles.base.DataProvider
IncrementalHintsFactory
com.yworks.yfiles.layout.PortConstraint
com.yworks.yfiles.layout.PortConstraintKeys.SOURCE_PORT_CONSTRAINT_KEY
com.yworks.yfiles.layout.PortConstraintKeys.TARGET_PORT_CONSTRAINT_KEY
com.yworks.yfiles.layout.PortConstraintKeys.SOURCE_GROUPID_KEY
com.yworks.yfiles.layout.PortConstraintKeys.TARGET_GROUPID_KEY
EDGE_LAYOUT_DESCRIPTOR_DPKEY
NODE_LAYOUT_DESCRIPTOR_DPKEY
com.yworks.yfiles.layout.hierarchic.incremental.NodeLayoutDescriptor
com.yworks.yfiles.layout.hierarchic.incremental.EdgeLayoutDescriptor
com.yworks.yfiles.layout.LabelLayoutTranslator
com.yworks.yfiles.layout.CanonicMultiStageLayouter.labelLayouter
com.yworks.yfiles.layout.LabelLayoutTranslator.translateNodeLabels
com.yworks.yfiles.layout.hierarchic.incremental.SwimLaneDescriptor
SWIMLANE_DESCRIPTOR_DPKEY
com.yworks.yfiles.layout.hierarchic.incremental.SequenceConstraintFactory


Public Properties
 PropertyDefined By
 InheritedcomponentLayouter : LayoutStage
Specifies the LayoutStage responsible for laying out the connected components of the graph.
CanonicMultiStageLayouter
  componentLayouterEnabled : Boolean
[override] Getter: Returns whether or not ComponentLayouter is enabled.
HierarchicLayouterImpl
  drawingDistanceCalculator : DrawingDistanceCalculator
Getter: Returns the current DrawingDistanceCalculator instance.
HierarchicLayouterImpl
  gridSpacing : Number
Specifies the equidistant spacing between the horizontal and vertical grid lines.
HierarchicLayouterImpl
 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
 InheritedlabelLayouter : LayoutStage
Getter: Returns the algorithm used for placing labels.
CanonicMultiStageLayouter
 InheritedlabelLayouterEnabled : Boolean
Getter: Returns whether or not LabelLayouter is enabled.
CanonicMultiStageLayouter
  layerer : Layerer
Getter: Returns the current Layerer instance.
HierarchicLayouterImpl
 InheritedlayoutOrientation : int
Specifies the main layout orientation.
CanonicMultiStageLayouter
  maximalDuration : uint
Getter: Returns the time limit (in milliseconds) set for the layout algorithm.
HierarchicLayouterImpl
  nodePlacer : NodePlacer
Getter: Returns the current NodePlacer instance.
HierarchicLayouterImpl
 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
  portAllocator : PortAllocator
Getter: Returns the current PortAllocator instance.
HierarchicLayouterImpl
  portConstraintOptimizer : PortConstraintOptimizer
Getter: Returns the current PortConstraintOptimizer instance.
HierarchicLayouterImpl
 InheritedselfLoopLayouter : LayoutStage
Getter: Returns the LayoutStage used for routing Self-loops.
CanonicMultiStageLayouter
 InheritedselfLoopLayouterEnabled : Boolean
Getter: Returns whether or not the SelfLoopLayouter is enabled.
CanonicMultiStageLayouter
  sequencer : Sequencer
Getter: Returns the current Sequencer instance.
HierarchicLayouterImpl
 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
Public Methods
 MethodDefined By
  
HierarchicLayouterImpl(init:Boolean = true)
Creates a new instance of HierarchicLayouter with default settings.
HierarchicLayouterImpl
 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] Always returns true.
HierarchicLayouterImpl
  
Returns an com.yworks.yfiles.layout.hierarchic.incremental.IncrementalHintsFactory implementation that can be used to obtain hint objects that can be associated with nodes and edges in the graph prior to the invocation of the layout algorithm using an appropriate com.yworks.yfiles.base.DataProvider implementation and the INCREMENTAL_HINTS_DPKEY DataProvider key.
HierarchicLayouterImpl
  
HierarchicLayouterImpl
  
HierarchicLayouterImpl
 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] Layouts the given graph.
HierarchicLayouterImpl
 Inherited
Disables all layout stages and performs only the core layouter.
CanonicMultiStageLayouter
 Inherited
equals(o:Object):Boolean
YObject
  
getAlgorithmProperty(key:Object):Object
Provides access to implementation specific properties of the algorithms used. Used for internal purposes.
HierarchicLayouterImpl
  
getClass():Class
[override]
HierarchicLayouterImpl
 Inherited
hashCode():int
YObject
  
[static] Creates a new instance of HierarchicLayouter with default settings.
HierarchicLayouterImpl
 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
  
setAlgorithmProperty(key:Object, value:Object):void
Provides access to implementation specific properties of the algorithms used internally.
HierarchicLayouterImpl
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
  
Factory method that is called lazily upon first usage.
HierarchicLayouterImpl
  
Factory method that is called during doLayoutCore().
HierarchicLayouterImpl
  
Factory method that is called during doLayoutCore().
HierarchicLayouterImpl
  
Factory method that is called during doLayoutCore().
HierarchicLayouterImpl
  
Callback method that is called during doLayoutCore().
HierarchicLayouterImpl
  
Factory method for the label layouter (com.yworks.yfiles.layout.CanonicMultiStageLayouter.labelLayouter) used by this layouter.
HierarchicLayouterImpl
  
Factory method that is called lazily upon first usage.
HierarchicLayouterImpl
  
Factory method that is called during doLayoutCore().
HierarchicLayouterImpl
  
Factory method that is called lazily upon first usage.
HierarchicLayouterImpl
  
Factory method that is called lazily upon first usage.
HierarchicLayouterImpl
  
Factory method that is called lazily upon first usage.
HierarchicLayouterImpl
  
Factory method that is called lazily upon first usage.
HierarchicLayouterImpl
  
Factory method that is called during doLayoutCore().
HierarchicLayouterImpl
  
Callback method that is called during doLayoutCore().
HierarchicLayouterImpl
  
Callback method that is called during doLayoutCore().
HierarchicLayouterImpl
  
Callback method that is called during doLayoutCore().
HierarchicLayouterImpl
  
Callback method that is called during doLayoutCore().
HierarchicLayouterImpl
 Inherited
CanonicMultiStageLayouter
  
Initializes this object.
HierarchicLayouterImpl
  
publishLayers(graph:LayoutGraph, layers:Layers):void
Callback method that publishes the layering information
HierarchicLayouterImpl
  
Callback method that publishes the sequencing information
HierarchicLayouterImpl
  
Removes bends from the edges which are obviously not necessary.
HierarchicLayouterImpl
Public Constants
 ConstantDefined By
  EDGE_LAYOUT_DESCRIPTOR_DPKEY : Object = y.layout.hierarchic.incremental.HierarchicLayouter.EDGE_LAYOUT_DESCRIPTOR_DPKEY
[static] com.yworks.yfiles.base.DataProvider key used to retrieve com.yworks.yfiles.layout.hierarchic.incremental.EdgeLayoutDescriptor instances for each edge in the graph.
HierarchicLayouterImpl
  INCREMENTAL_HINTS_DPKEY : Object = y.layout.hierarchic.incremental.HierarchicLayouter.INCREMENTAL_HINTS_DPKEY
[static] com.yworks.yfiles.base.DataProvider key used to retrieve incremental layout hint objects for nodes and edges that have been set using the com.yworks.yfiles.layout.hierarchic.incremental.IncrementalHintsFactory which itself can be obtained from the createIncrementalHintsFactory() method.
HierarchicLayouterImpl
  INCREMENTAL_NODES_DPKEY : Object = y.layout.hierarchic.incremental.HierarchicLayouter.INCREMENTAL_NODES_DPKEY
[static] DataProvider key used to hold boolean values for each node in the graph that indicate whether the node has to be added incrementally.
HierarchicLayouterImpl
  LAYER_VALUE_HOLDER_DPKEY : Object = y.layout.hierarchic.incremental.HierarchicLayouter.LAYER_VALUE_HOLDER_DPKEY
[static] Used for publishing the final layering information.
HierarchicLayouterImpl
  NODE_LAYOUT_DESCRIPTOR_DPKEY : Object = y.layout.hierarchic.incremental.HierarchicLayouter.NODE_LAYOUT_DESCRIPTOR_DPKEY
[static] com.yworks.yfiles.base.DataProvider key used to retrieve com.yworks.yfiles.layout.hierarchic.incremental.NodeLayoutDescriptor instances for each node in the graph.
HierarchicLayouterImpl
  SEQUENCE_VALUE_HOLDER_DPKEY : Object = y.layout.hierarchic.incremental.HierarchicLayouter.SEQUENCE_VALUE_HOLDER_DPKEY
[static] Used for publishing the final sequencing information.
HierarchicLayouterImpl
  SWIMLANE_DESCRIPTOR_DPKEY : Object = y.layout.hierarchic.incremental.HierarchicLayouter.SWIMLANE_DESCRIPTOR_DPKEY
[static] com.yworks.yfiles.base.DataProvider key used to store com.yworks.yfiles.layout.hierarchic.incremental.SwimLaneDescriptor instances for each node in the graph.
HierarchicLayouterImpl
Property Detail
componentLayouterEnabledproperty
componentLayouterEnabled:Boolean[override]

Getter: Returns whether or not ComponentLayouter is enabled. By default it is disabled.

Setter: Specifies whether or not to enable the ComponentLayouter. By default it is disabled.


Implementation
    public function get componentLayouterEnabled():Boolean
    public function set componentLayouterEnabled(value:Boolean):void
drawingDistanceCalculatorproperty 
drawingDistanceCalculator:DrawingDistanceCalculator

Getter: Returns the current DrawingDistanceCalculator instance.

Setter: Sets the DrawingDistanceCalculator implementation that is used in the next run. For the default see createDrawingDistanceCalculator().


Implementation
    public function get drawingDistanceCalculator():DrawingDistanceCalculator
    public function set drawingDistanceCalculator(value:DrawingDistanceCalculator):void

Throws
ReferenceError — if the argument is null

See also

gridSpacingproperty 
gridSpacing:Number

Specifies the equidistant spacing between the horizontal and vertical grid lines.

By default no grid is specified (spacing is <= 0).


Implementation
    public function get gridSpacing():Number
    public function set gridSpacing(value:Number):void
layererproperty 
layerer:Layerer

Getter: Returns the current Layerer instance.

Setter: Sets the Layerer implementation that is used in the next run. For the default see createLayerer().


Implementation
    public function get layerer():Layerer
    public function set layerer(value:Layerer):void

Throws
ReferenceError — if the argument is null

See also

maximalDurationproperty 
maximalDuration:uint

Getter: Returns the time limit (in milliseconds) set for the layout algorithm.

Setter: Sets a preferred time limit (in milliseconds) for the layout algorithm. Note that restricting the maximal duration may result in a worse layout quality. Furthermore, the real runtime may exceed the maximal duration since the layout algorithm still have to find a valid solution.


Implementation
    public function get maximalDuration():uint
    public function set maximalDuration(value:uint):void
nodePlacerproperty 
nodePlacer:NodePlacer

Getter: Returns the current NodePlacer instance.

Setter: Sets the NodePlacer implementation that is used in the next run. For the default see createNodePlacer().


Implementation
    public function get nodePlacer():NodePlacer
    public function set nodePlacer(value:NodePlacer):void

Throws
ReferenceError — if the argument is null

See also

portAllocatorproperty 
portAllocator:PortAllocator

Getter: Returns the current PortAllocator instance.

Setter: Sets the PortAllocator implementation that is used in the next run. For the default see createPortAllocator().


Implementation
    public function get portAllocator():PortAllocator
    public function set portAllocator(value:PortAllocator):void

Throws
ReferenceError — if the argument is null

See also

portConstraintOptimizerproperty 
portConstraintOptimizer:PortConstraintOptimizer

Getter: Returns the current PortConstraintOptimizer instance.

Setter: Sets the PortConstraintOptimizer implementation that is used in the next run. For the default see createPortConstraintOptimizer().


Implementation
    public function get portConstraintOptimizer():PortConstraintOptimizer
    public function set portConstraintOptimizer(value:PortConstraintOptimizer):void

See also

sequencerproperty 
sequencer:Sequencer

Getter: Returns the current Sequencer instance.

Setter: Sets the Sequencer implementation that is used in the next run. For the default see createSequencer().


Implementation
    public function get sequencer():Sequencer
    public function set sequencer(value:Sequencer):void

Throws
ReferenceError — if the argument is null

See also

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

Creates a new instance of HierarchicLayouter with default settings.

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.

See also

Method Detail
canLayoutCore()method
override public function canLayoutCore(graph:LayoutGraph):Boolean

Always returns true.

Parameters

graph:LayoutGraph — the graph to check

Returns
Booleantrue
createDrawingDistanceCalculator()method 
protected function createDrawingDistanceCalculator():DrawingDistanceCalculator

Factory method that is called lazily upon first usage.

Returns
DrawingDistanceCalculator — a default implementation (new DefaultDrawingDistanceCalculator())

See also

createEdgeReverser()method 
protected function createEdgeReverser():EdgeReverser

Factory method that is called during doLayoutCore(). Creates an appropriate EdgeReverser implementation

Returns
EdgeReverser — an implementation

See also

createGrouping()method 
protected function createGrouping(graph:LayoutGraph):GraphGrouping

Factory method that is called during doLayoutCore().

Parameters

graph:LayoutGraph — the graph to obtain the grouping information from.

Returns
GraphGrouping — a Grouping or null if there is no grouping information associated with the graph.

See also

createIncrementalHintsFactory()method 
public function createIncrementalHintsFactory():IncrementalHintsFactory

Returns an com.yworks.yfiles.layout.hierarchic.incremental.IncrementalHintsFactory implementation that can be used to obtain hint objects that can be associated with nodes and edges in the graph prior to the invocation of the layout algorithm using an appropriate com.yworks.yfiles.base.DataProvider implementation and the INCREMENTAL_HINTS_DPKEY DataProvider key.

Returns
IncrementalHintsFactory — an instance that can be used with this layouter instance

See also

createIncrementalLayerer()method 
protected function createIncrementalLayerer():Layerer

Factory method that is called during doLayoutCore(). Creates an appropriate IncrementalLayerer implementation

Returns
Layerer — an implementation

See also

createItemData()method 
protected function createItemData(g:LayoutGraph, itemFactory:ItemFactory):void

Callback method that is called during doLayoutCore(). This method creates the com.yworks.yfiles.layout.hierarchic.incremental.NodeData and com.yworks.yfiles.layout.hierarchic.incremental.EdgeData instances and binds them to the elements using the itemFactory.

Parameters

g:LayoutGraph — the graph to obtain the grouping information from.
 
itemFactory:ItemFactory — the ItemFactory to use

See also

createLabelLayouter()method 
protected function createLabelLayouter():LayoutStage

Factory method for the label layouter (com.yworks.yfiles.layout.CanonicMultiStageLayouter.labelLayouter) used by this layouter. In order to use the the integrated node label awareness feature one has to use an com.yworks.yfiles.layout.LabelLayoutTranslator instance with com.yworks.yfiles.layout.LabelLayoutTranslator.translateNodeLabels set to true. Likewise in order to make use of the integrated edge labeling com.yworks.yfiles.layout.LabelLayoutTranslator.translateEdgeLabels must be set to true and com.yworks.yfiles.layout.LabelLayoutTranslator.writeBackEdgeLabels must be set to true also (which is the default).

Returns
LayoutStage — a new LabelLayoutTranslator with node translation enabled and "node label write back" disabled.

See also

createLayerConstraintFactory()method 
public function createLayerConstraintFactory(graph:Graph):LayerConstraintFactory

Parameters

graph:Graph

Returns
LayerConstraintFactory
createLayerer()method 
protected function createLayerer():Layerer

Factory method that is called lazily upon first usage.

Returns
Layerer — a default implementation (new MultiComponentLayerer(new OldLayererWrapper(new WeightedLayerer())))

See also

createLayers()method 
protected function createLayers(ldp:LayoutDataProvider):Layers

Factory method that is called during doLayoutCore(). Creates an appropriate Layers implementation using the LayoutDataProvider

Parameters

ldp:LayoutDataProvider — provides the layout data

Returns
Layers — a Layers implementation

See also

createNodePlacer()method 
protected function createNodePlacer():NodePlacer

Factory method that is called lazily upon first usage.

Returns
NodePlacer — a default implementation (new SimplexNodePlacer)

See also

createPortAllocator()method 
protected function createPortAllocator():PortAllocator

Factory method that is called lazily upon first usage.

Returns
PortAllocator — a default implementation (new DefaultPortAllocator())

See also

createPortConstraintOptimizer()method 
protected function createPortConstraintOptimizer():PortConstraintOptimizer

Factory method that is called lazily upon first usage.

Returns
PortConstraintOptimizernull

See also

createSequenceConstraintFactory()method 
public function createSequenceConstraintFactory(graph:Graph):SequenceConstraintFactory

Parameters

graph:Graph

Returns
SequenceConstraintFactory
createSequencer()method 
protected function createSequencer():Sequencer

Factory method that is called lazily upon first usage.

Returns
Sequencer — a default implementation (new DefaultLayerSequencer())

See also

createSubgraphLayerSequencer()method 
protected function createSubgraphLayerSequencer():Sequencer

Factory method that is called during doLayoutCore().

Returns
Sequencer — a Sequencer implementation that can sequence subgraphs incrementally.

See also

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

Layouts the given graph.

Parameters

graph:LayoutGraph — the graph to layout

getAlgorithmProperty()method 
public function getAlgorithmProperty(key:Object):Object

Provides access to implementation specific properties of the algorithms used. Used for internal purposes.

Parameters

key:Object — the key to a property

Returns
Object — the associated value or null

See also

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

Returns
Class
getEdgeLayoutDescriptors()method 
protected function getEdgeLayoutDescriptors(graph:LayoutGraph):DataProvider

Callback method that is called during doLayoutCore(). This method returns a DataProvider that holds the EdgeLayoutDescriptor information.

Parameters

graph:LayoutGraph — the graph to obtain the information from.

Returns
DataProvider — a DataProvider instance or null

See also

getIncrementalHints()method 
protected function getIncrementalHints(graph:LayoutGraph):DataProvider

Callback method that is called during doLayoutCore(). This method returns a DataProvider that holds the incremental hint information.

Parameters

graph:LayoutGraph — the graph to obtain the information from.

Returns
DataProvider — a DataProvider instance or null

See also

getNodeLayoutDescriptors()method 
protected function getNodeLayoutDescriptors(graph:LayoutGraph):DataProvider

Callback method that is called during doLayoutCore(). This method returns a DataProvider that holds the NodeLayoutDescriptor information.

Parameters

graph:LayoutGraph — the graph to obtain the information from.

Returns
DataProvider — a DataProvider instance or null

See also

getSwimLaneDescriptors()method 
protected function getSwimLaneDescriptors(graph:LayoutGraph):DataProvider

Callback method that is called during doLayoutCore(). This method returns a DataProvider that holds the SwimLaneDescriptor information.

Parameters

graph:LayoutGraph — the graph to obtain the information from.

Returns
DataProvider — a DataProvider instance or null

See also

initHierarchicLayouterImpl()method 
protected final function initHierarchicLayouterImpl():void

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

See also

newHierarchicLayouterImpl()method 
public static function newHierarchicLayouterImpl():HierarchicLayouterImpl

Creates a new instance of HierarchicLayouter with default settings.

Returns
HierarchicLayouterImpl

See also

publishLayers()method 
protected function publishLayers(graph:LayoutGraph, layers:Layers):void

Callback method that publishes the layering information

Parameters

graph:LayoutGraph — the graph that contains the elements
 
layers:Layers — the Layers implementation to get the layering information from

See also

publishSequences()method 
protected function publishSequences(graph:LayoutGraph, layers:Layers, ldp:LayoutDataProvider):void

Callback method that publishes the sequencing information

Parameters

graph:LayoutGraph — the graph that contains the elements
 
layers:Layers — the Layers implementation to get the layering information from
 
ldp:LayoutDataProvider — the com.yworks.yfiles.layout.hierarchic.incremental.LayoutDataProvider to get the node information from

See also

reduceBendCount()method 
protected function reduceBendCount(graph:LayoutGraph):void

Removes bends from the edges which are obviously not necessary. This method removes bends from the graph that are collinear.

Parameters

graph:LayoutGraph — the graph to obtain the edges from

setAlgorithmProperty()method 
public function setAlgorithmProperty(key:Object, value:Object):void

Provides access to implementation specific properties of the algorithms used internally. Used for internal purposes.

Parameters

key:Object — the key to a property
 
value:Object — the value to associate with the key

Constant Detail
EDGE_LAYOUT_DESCRIPTOR_DPKEYConstant
public static const EDGE_LAYOUT_DESCRIPTOR_DPKEY:Object = y.layout.hierarchic.incremental.HierarchicLayouter.EDGE_LAYOUT_DESCRIPTOR_DPKEY

com.yworks.yfiles.base.DataProvider key used to retrieve com.yworks.yfiles.layout.hierarchic.incremental.EdgeLayoutDescriptor instances for each edge in the graph. Different settings will affect the routing of the edges during the layout.

See also

INCREMENTAL_HINTS_DPKEYConstant 
public static const INCREMENTAL_HINTS_DPKEY:Object = y.layout.hierarchic.incremental.HierarchicLayouter.INCREMENTAL_HINTS_DPKEY

com.yworks.yfiles.base.DataProvider key used to retrieve incremental layout hint objects for nodes and edges that have been set using the com.yworks.yfiles.layout.hierarchic.incremental.IncrementalHintsFactory which itself can be obtained from the createIncrementalHintsFactory() method. Note that HierarchicLayouter uses the registered com.yworks.yfiles.base.DataProvider to get layout hint objects as well for nodes as for edges so neither com.yworks.yfiles.base.Graph.createNodeMap() nor com.yworks.yfiles.base.Graph.createEdgeMap() may be used to create this provider.

See also

INCREMENTAL_NODES_DPKEYConstant 
public static const INCREMENTAL_NODES_DPKEY:Object = y.layout.hierarchic.incremental.HierarchicLayouter.INCREMENTAL_NODES_DPKEY

DataProvider key used to hold boolean values for each node in the graph that indicate whether the node has to be added incrementally. This key is used by the incremental versions of com.yworks.yfiles.layout.hierarchic.incremental.Layerer, such as com.yworks.yfiles.layout.hierarchic.incremental.TopologicalIncrementalLayerer to determine which nodes need to be inserted incrementally, as well as the com.yworks.yfiles.layout.hierarchic.incremental.Sequencer implementation that determines incrementally sequenced nodes.

See also

LAYER_VALUE_HOLDER_DPKEYConstant 
public static const LAYER_VALUE_HOLDER_DPKEY:Object = y.layout.hierarchic.incremental.HierarchicLayouter.LAYER_VALUE_HOLDER_DPKEY

Used for publishing the final layering information. If the com.yworks.yfiles.base.DataProvider associated to this key is also a com.yworks.yfiles.base.DataAcceptor, the integer layer id of each node is stored using the acceptor's setInt (com.yworks.yfiles.base.DataAcceptor.setInt()) method. Otherwise, the provider's values should be of type com.yworks.yfiles.layout.hierarchic.incremental.IntValueHolder and the value holder's setValue (com.yworks.yfiles.layout.hierarchic.incremental.IntValueHolder.value) method is used to store the integer layer ids of each node.

See also

NODE_LAYOUT_DESCRIPTOR_DPKEYConstant 
public static const NODE_LAYOUT_DESCRIPTOR_DPKEY:Object = y.layout.hierarchic.incremental.HierarchicLayouter.NODE_LAYOUT_DESCRIPTOR_DPKEY

com.yworks.yfiles.base.DataProvider key used to retrieve com.yworks.yfiles.layout.hierarchic.incremental.NodeLayoutDescriptor instances for each node in the graph. Different settings will affect node placement and port assignment during the layout.

See also

SEQUENCE_VALUE_HOLDER_DPKEYConstant 
public static const SEQUENCE_VALUE_HOLDER_DPKEY:Object = y.layout.hierarchic.incremental.HierarchicLayouter.SEQUENCE_VALUE_HOLDER_DPKEY

Used for publishing the final sequencing information. If the com.yworks.yfiles.base.DataProvider associated to this key is also a com.yworks.yfiles.base.DataAcceptor, the sequence order number of each node is stored using the acceptor's setInt (com.yworks.yfiles.base.DataAcceptor.setInt()) method. Otherwise, the provider's values should be of type com.yworks.yfiles.layout.hierarchic.incremental.IntValueHolder and the value holder's setValue (com.yworks.yfiles.layout.hierarchic.incremental.IntValueHolder.value) method is used to store the sequence order number of each node.

See also

SWIMLANE_DESCRIPTOR_DPKEYConstant 
public static const SWIMLANE_DESCRIPTOR_DPKEY:Object = y.layout.hierarchic.incremental.HierarchicLayouter.SWIMLANE_DESCRIPTOR_DPKEY

com.yworks.yfiles.base.DataProvider key used to store com.yworks.yfiles.layout.hierarchic.incremental.SwimLaneDescriptor instances for each node in the graph. If this key is present during the layout. The layout algorithm will arrange nodes in swim lanes. The information about the swim lanes is finally written back into the descriptor instances. Instances can be shared among multiple nodes in the same lane, but don't have to be shared.

See also