Package | com.yworks.yfiles.layout.hierarchic.incremental |
Class | public class SimplexNodePlacer |
Inheritance | SimplexNodePlacer YObject Object |
Implements | NodePlacer |
See also
Property | Defined By | ||
---|---|---|---|
baryCenterMode : Boolean
Specifies whether or not to use the barycenter drawing mode. | SimplexNodePlacer | ||
bendReductionEnabled : Boolean
Specifies whether or not an optimization step should be applied that tries to further reduce the number of bends. | SimplexNodePlacer | ||
breakLongSegments : Boolean
Specifies whether this instance may break long edge segments in favor of a more compact layout. | SimplexNodePlacer | ||
exactPlacementEnforced : Boolean
Specifies whether this instance should enforce the placement of nodes at their exact current position, even if this violates minimum distance constraints. | SimplexNodePlacer | ||
fromSketchLayerAssignment : Boolean
Specifies whether this instance should try to use the coordinates given from the current sketch for the determination of the layer coordinates. | SimplexNodePlacer | ||
groupCompactionStrategy : int
Specifies the strategy that is used to control the horizontal compactness of group nodes. | SimplexNodePlacer | ||
horizontalCompaction : Boolean
Determines whether this instance tries to create a maximally compact horizontal layout at the cost of more bends. | SimplexNodePlacer | ||
maximalDuration : uint
Getter:
Returns the time limit (in milliseconds) set for the algorithm. | SimplexNodePlacer | ||
minimumSublayerDistance : Number
Specifies the minimum distance between the upper and lower sublayer (see useNodeCompaction). | SimplexNodePlacer | ||
straightenEdges : Boolean
Whether or not a postprocessing step should be applied that tries to remove some bends. | SimplexNodePlacer | ||
swimLaneCrossingWeight : Number
Specifies the relative weight of edges crossing a swim lane relative to edges that stay in their lane. | SimplexNodePlacer | ||
useLabelCompaction : Boolean
Specifies whether or not labels should be placed in a more compact style. | SimplexNodePlacer | ||
useNodeCompaction : Boolean
Specifies whether or not nodes should be placed in a more compact style with respect to layout width. | SimplexNodePlacer |
Method | Defined By | ||
---|---|---|---|
SimplexNodePlacer(init:Boolean = true) | SimplexNodePlacer | ||
assignLayerCoordinates(graph:LayoutGraph, layoutDataProvider:LayoutDataProvider, layers:Layers):void | SimplexNodePlacer | ||
assignSequenceCoordinates(graph:LayoutGraph, layoutDataProvider:LayoutDataProvider, layers:Layers, drawingDistanceCalculator:DrawingDistanceCalculator):void | SimplexNodePlacer | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | SimplexNodePlacer | ||
hashCode():int | YObject | ||
[static] | SimplexNodePlacer |
Method | Defined By | ||
---|---|---|---|
assignNodesToSublayer(layerNodes:NodeList, ldp:LayoutDataProvider, graph:LayoutGraph, lowerSublayer:NodeMap):void
If option useNodeCompaction is enabled, this method is called to assign the nodes of a layer to the corresponding upper/lower sublayer. | SimplexNodePlacer | ||
getLayerAlignment(graph:LayoutGraph, ldp:LayoutDataProvider, node:Node, layerIndex:int, minLayerHeight:Number):Number
Callback method used by assignLayerCoordinates() to determine the alignment of the node inside the layer
| SimplexNodePlacer | ||
Determines the minimum allowed distance between two nodes in a given layer
| SimplexNodePlacer | ||
Callback method used by assignLayerCoordinates() to determine the minimum height of a layer. | SimplexNodePlacer | ||
initSimplexNodePlacer():void | SimplexNodePlacer | ||
Callback used by both assignLayerCoordinates() and assignSequenceCoordinates() to determine whether the given node should be treated as a node with fixed (given) coordinates. | SimplexNodePlacer |
Constant | Defined By | ||
---|---|---|---|
GROUP_COMPACTION_MAX : int = 1 [static]
Compaction strategy specifier for use with groupCompactionStrategy. | SimplexNodePlacer | ||
GROUP_COMPACTION_NONE : int = 0 [static]
Compaction strategy specifier for use with groupCompactionStrategy. | SimplexNodePlacer |
baryCenterMode | property |
baryCenterMode:Boolean
Specifies whether or not to use the barycenter drawing mode. If this mode is enabled the resulting drawing is likely to have more bends but may be more symmetric.
By default this mode is turned off.
public function get baryCenterMode():Boolean
public function set baryCenterMode(value:Boolean):void
bendReductionEnabled | property |
bendReductionEnabled:Boolean
Specifies whether or not an optimization step should be applied that tries to further reduce the number of bends. By default this option is enabled. Note: using this option may increase runtime. If the runtime exceeds the maximal duration (see maximalDuration) the number of bends is not reduced.
public function get bendReductionEnabled():Boolean
public function set bendReductionEnabled(value:Boolean):void
See also
breakLongSegments | property |
breakLongSegments:Boolean
Specifies whether this instance may break long edge segments in favor of a more compact layout.
public function get breakLongSegments():Boolean
public function set breakLongSegments(value:Boolean):void
exactPlacementEnforced | property |
exactPlacementEnforced:Boolean
Specifies whether this instance should enforce the placement of nodes at their exact current position, even if this violates minimum distance constraints.
The default is true
.
public function get exactPlacementEnforced():Boolean
public function set exactPlacementEnforced(value:Boolean):void
fromSketchLayerAssignment | property |
fromSketchLayerAssignment:Boolean
Specifies whether this instance should try to use the coordinates given from the current sketch for the determination of the layer coordinates.
public function get fromSketchLayerAssignment():Boolean
public function set fromSketchLayerAssignment(value:Boolean):void
groupCompactionStrategy | property |
groupCompactionStrategy:int
Specifies the strategy that is used to control the horizontal compactness of group nodes.
public function get groupCompactionStrategy():int
public function set groupCompactionStrategy(value:int):void
See also
horizontalCompaction | property |
horizontalCompaction:Boolean
Determines whether this instance tries to create a maximally compact horizontal layout at the cost of more bends.
For best results, breakLongSegments and useLabelCompaction should also be enabled.
public function get horizontalCompaction():Boolean
public function set horizontalCompaction(value:Boolean):void
See also
maximalDuration | property |
maximalDuration:uint
Getter: Returns the time limit (in milliseconds) set for the algorithm.
Setter: Sets a preferred time limit (in milliseconds) for the 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 algorithm still have to find a valid solution. public function get maximalDuration():uint
public function set maximalDuration(value:uint):void
minimumSublayerDistance | property |
minimumSublayerDistance:Number
Specifies the minimum distance between the upper and lower sublayer (see useNodeCompaction). Note that this option is only considered if the node compaction is enabled. Furthermore, a too small distance value may prevent adjacent nodes from being placed in a stacked style (horizontally interleaving) because the vertical distance between these nodes must be larger or equal to the value specified by com.yworks.yfiles.layout.hierarchic.incremental.NodeLayoutDescriptor.minimumDistance.
public function get minimumSublayerDistance():Number
public function set minimumSublayerDistance(value:Number):void
See also
straightenEdges | property |
straightenEdges:Boolean
Whether or not a postprocessing step should be applied that tries to remove some bends. Note that this option is only considered if option baryCenterMode and useNodeCompaction are both disabled. Furthermore, enabling edge straightening may violate some minimum distances specified by the user and the edge distribution is no longer uniform.
The default is false
.
public function get straightenEdges():Boolean
public function set straightenEdges(value:Boolean):void
See also
swimLaneCrossingWeight | property |
swimLaneCrossingWeight:Number
Specifies the relative weight of edges crossing a swim lane relative to edges that stay in their lane.
A value of 0.0d
will effectively make the algorithm ignore edges crossing a swim lane border.
Defaults to 0.0d
.
public function get swimLaneCrossingWeight():Number
public function set swimLaneCrossingWeight(value:Number):void
useLabelCompaction | property |
useLabelCompaction:Boolean
Specifies whether or not labels should be placed in a more compact style. If this option is enabled the algorithm tries to place adjacent label elements in a stacked style, i.e., horizontally interleaving. By default this option is disabled. Note that this option does not work with customized com.yworks.yfiles.layout.hierarchic.incremental.DrawingDistanceCalculator s, see com.yworks.yfiles.layout.hierarchic.incremental.HierarchicLayouterImpl.drawingDistanceCalculator.
public function get useLabelCompaction():Boolean
public function set useLabelCompaction(value:Boolean):void
See also
useNodeCompaction | property |
useNodeCompaction:Boolean
Specifies whether or not nodes should be placed in a more compact style with respect to layout width. If enabled, the algorithm may place the nodes of a layer in a stacked style (horizontally interleaving), i.e., it splits the layer into an upper and lower sublayer and places adjacent nodes into different sublayers if this reduces the width of the layer. Note that enabling this option increases the required layout height. By default this option is disabled.
Note that this option does not work with customized com.yworks.yfiles.layout.hierarchic.incremental.DrawingDistanceCalculator s, see com.yworks.yfiles.layout.hierarchic.incremental.HierarchicLayouterImpl.drawingDistanceCalculator. public function get useNodeCompaction():Boolean
public function set useNodeCompaction(value:Boolean):void
See also
SimplexNodePlacer | () | Constructor |
public function SimplexNodePlacer(init:Boolean = true)
init:Boolean (default = true )
|
assignLayerCoordinates | () | method |
public function assignLayerCoordinates(graph:LayoutGraph, layoutDataProvider:LayoutDataProvider, layers:Layers):void
Parameters
graph:LayoutGraph | |
layoutDataProvider:LayoutDataProvider | |
layers:Layers |
assignNodesToSublayer | () | method |
protected function assignNodesToSublayer(layerNodes:NodeList, ldp:LayoutDataProvider, graph:LayoutGraph, lowerSublayer:NodeMap):void
If option useNodeCompaction is enabled, this method is called to assign the nodes of a layer to the corresponding upper/lower sublayer.
Parameters
layerNodes:NodeList — list that contains all normal nodes (see com.yworks.yfiles.layout.hierarchic.incremental.NodeDataConstants.TYPE_NORMAL) of a layer.
| |
ldp:LayoutDataProvider — the LayoutDataProvider instance.
| |
graph:LayoutGraph — the graph instance.
| |
lowerSublayer:NodeMap — NodeMap whose com.yworks.yfiles.base.NodeMap.getBool() method has to return true for each node that should be placed in the lower sublayer (values are set by this method).
|
See also
assignSequenceCoordinates | () | method |
public function assignSequenceCoordinates(graph:LayoutGraph, layoutDataProvider:LayoutDataProvider, layers:Layers, drawingDistanceCalculator:DrawingDistanceCalculator):void
Parameters
graph:LayoutGraph | |
layoutDataProvider:LayoutDataProvider | |
layers:Layers | |
drawingDistanceCalculator:DrawingDistanceCalculator |
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getLayerAlignment | () | method |
protected function getLayerAlignment(graph:LayoutGraph, ldp:LayoutDataProvider, node:Node, layerIndex:int, minLayerHeight:Number):Number
Callback method used by assignLayerCoordinates() to determine the alignment of the node inside the layer
Parameters
graph:LayoutGraph | |
ldp:LayoutDataProvider | |
node:Node | |
layerIndex:int | |
minLayerHeight:Number |
Number |
See also
getMinDistance | () | method |
protected function getMinDistance(graph:LayoutGraph, layer:Layer, predNode:Node, succ:Node):Number
Determines the minimum allowed distance between two nodes in a given layer
Parameters
graph:LayoutGraph — the graph that contains the nodes
| |
layer:Layer — the layer that contains the nodes
| |
predNode:Node — the node to the left of the other one, may be null to indicate a border line
| |
succ:Node — the node to the right of the other one, may be null to indicate a border line
|
Number — the minimum distance allowed between those two nodes ( >=0 )
|
See also
getMinimumLayerHeight | () | method |
protected function getMinimumLayerHeight(graph:LayoutGraph, ldp:LayoutDataProvider, layer:Layer):Number
Callback method used by assignLayerCoordinates() to determine the minimum height of a layer.
Parameters
graph:LayoutGraph | |
ldp:LayoutDataProvider | |
layer:Layer |
Number |
See also
initSimplexNodePlacer | () | method |
protected final function initSimplexNodePlacer():void
isFixedNode | () | method |
protected function isFixedNode(graph:LayoutGraph, provider:LayoutDataProvider, node:Node, inLayer:Boolean):Boolean
Callback used by both assignLayerCoordinates() and assignSequenceCoordinates() to determine whether the given node should be treated as a node with fixed (given) coordinates.
Parameters
graph:LayoutGraph — the graph that contains the node
| |
provider:LayoutDataProvider — the current LayoutDataProvider
| |
node:Node — the node
| |
inLayer:Boolean — whether the nodes' layer coordinate is queried or the sequence coordinate. Iff inLayer is true this method is called from within the assignLayerCoordinates() method
|
Boolean — whether the node should be treated as fixed
|
See also
newSimplexNodePlacer | () | method |
GROUP_COMPACTION_MAX | Constant |
public static const GROUP_COMPACTION_MAX:int = 1
Compaction strategy specifier for use with groupCompactionStrategy. This specifies maximal horizontal group compaction, i.e. the node placer will try to minimize the horizontally occupied space for a group node.
See also
GROUP_COMPACTION_NONE | Constant |
public static const GROUP_COMPACTION_NONE:int = 0
Compaction strategy specifier for use with groupCompactionStrategy. This specifies no horizontal group compaction, i.e. group node contents will occupy nearly the same horizontal positions as when not grouped at all.
See also