Package | com.yworks.yfiles.layout.hierarchic.incremental |
Class | public class NodeLayoutDescriptor |
Inheritance | NodeLayoutDescriptor YObject Object |
See also
Property | Defined By | ||
---|---|---|---|
gridReference : YPoint
Specifies a reference point relative to the center of the node which will be placed on a grid coordinate. | NodeLayoutDescriptor | ||
layerAlignment : Number
Getter:
Returns the alignment of the node within its layer Default is 0.5d which results in center-aligned nodes. | NodeLayoutDescriptor | ||
minimumDistance : Number
Getter:
Returns the preferred minimum distance of the node to obstacles. | NodeLayoutDescriptor | ||
minimumLayerHeight : Number
Specifies the minimum height of the layer this node will be assigned to. | NodeLayoutDescriptor | ||
nodeLabelMode : int
Getter:
Returns the mode that determines the consideration of node labels during the layout. This can be one of NODE_LABEL_MODE_NEVER, NODE_LABEL_MODE_CONSIDER_FOR_SELF_LOOPS, NODE_LABEL_MODE_CONSIDER_FOR_DRAWING, or NODE_LABEL_MODE_CONSIDER_FOR_ROUTING. | NodeLayoutDescriptor | ||
portAssignment : int
Specifies the assignment strategy which is used to distribute the ports on the node borders. | NodeLayoutDescriptor | ||
portBorderGapRatios : Number [write-only]
Sets the port border gap ratio for the port distribution on all sides of the node. | NodeLayoutDescriptor |
Method | Defined By | ||
---|---|---|---|
NodeLayoutDescriptor(init:Boolean = true)
Creates a new instance of a NodeLayoutDescriptor using the default values. | NodeLayoutDescriptor | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | NodeLayoutDescriptor | ||
getPortBorderGapRatio(side:int):Number
Returns the port border gap ratio for the port distribution at the given side. | NodeLayoutDescriptor | ||
hashCode():int | YObject | ||
[static]
Creates a new instance of a NodeLayoutDescriptor using the default values. | NodeLayoutDescriptor | ||
setPortBorderGapRatio(side:int, ratio:Number):void
Sets the port border gap ratio for the port distribution at the given side. | NodeLayoutDescriptor |
Method | Defined By | ||
---|---|---|---|
initNodeLayoutDescriptor():void
Initializes this object. | NodeLayoutDescriptor |
Constant | Defined By | ||
---|---|---|---|
NODE_LABEL_MODE_CONSIDER_FOR_DRAWING : int = 2 [static]
Byte constant used by nodeLabelMode and nodeLabelMode. | NodeLayoutDescriptor | ||
NODE_LABEL_MODE_CONSIDER_FOR_ROUTING : int = 3 [static]
Byte constant used by nodeLabelMode and nodeLabelMode. | NodeLayoutDescriptor | ||
NODE_LABEL_MODE_CONSIDER_FOR_SELF_LOOPS : int = 1 [static]
Byte constant used by nodeLabelMode and nodeLabelMode. | NodeLayoutDescriptor | ||
NODE_LABEL_MODE_NEVER : int = 0 [static]
Byte constant used by nodeLabelMode and nodeLabelMode. | NodeLayoutDescriptor | ||
PORT_ASSIGNMENT_DEFAULT : int = 0 [static]
Port assignment specifier that describes the default port assignment strategy of com.yworks.yfiles.layout.hierarchic.IncrementalHierarchicLayouter. | NodeLayoutDescriptor | ||
PORT_ASSIGNMENT_ON_GRID : int = 1 [static]
Port assignment specifier that describes a port assignment strategy which places all edges on grid lines. | NodeLayoutDescriptor | ||
PORT_ASSIGNMENT_ON_SUBGRID : int = 2 [static]
Port assignment specifier that describes a port assignment strategy which places all edges on grid lines or subgrid lines. | NodeLayoutDescriptor |
gridReference | property |
gridReference:YPoint
Specifies a reference point relative to the center of the node which will be placed on a grid coordinate. By default the reference point is com.yworks.yfiles.geom.YPoint.ORIGIN and the nodes' center is placed on the grid.
The grid reference point will only be considered if there actually is a grid (com.yworks.yfiles.layout.hierarchic.IncrementalHierarchicLayouter.gridSpacing).
public function get gridReference():YPoint
public function set gridReference(value:YPoint):void
See also
layerAlignment | property |
layerAlignment:Number
Getter:
Returns the alignment of the node within its layer Default is 0.5d
which results in center-aligned nodes.
0.0d
means nodes are aligned at the top of the layer (for top-down drawing). A value of 0.5d
results in center-aligned nodes and 1.0d
leads to bottom-aligned nodes.
public function get layerAlignment():Number
public function set layerAlignment(value:Number):void
IllegalArgumentException — if the alignment is not within [0.0d .. 1.0d]
|
minimumDistance | property |
minimumDistance:Number
Getter:
Returns the preferred minimum distance of the node to obstacles.
Default is 5.0d
.
public function get minimumDistance():Number
public function set minimumDistance(value:Number):void
minimumLayerHeight | property |
minimumLayerHeight:Number
Specifies the minimum height of the layer this node will be assigned to. Note, that this will only affect the drawing if different layerAlignments (layerAlignment) are present.
public function get minimumLayerHeight():Number
public function set minimumLayerHeight(value:Number):void
See also
nodeLabelMode | property |
nodeLabelMode:int
Getter: Returns the mode that determines the consideration of node labels during the layout. This can be one of NODE_LABEL_MODE_NEVER, NODE_LABEL_MODE_CONSIDER_FOR_SELF_LOOPS, NODE_LABEL_MODE_CONSIDER_FOR_DRAWING, or NODE_LABEL_MODE_CONSIDER_FOR_ROUTING. The default is NODE_LABEL_MODE_CONSIDER_FOR_DRAWING .
Setter: Sets the mode that determines the consideration of node labels during the layout. Note that in order to get this feature working the algorithm must be provided information about the layout of the node labels. If com.yworks.yfiles.layout.hierarchic.IncrementalHierarchicLayouter is used for the layout the com.yworks.yfiles.layout.hierarchic.IncrementalHierarchicLayouter.considerNodeLabels should be set totrue
. Otherwise one has to assure that e.g. via an instanceof com.yworks.yfiles.layout.LabelLayoutTranslator the algorithm receives the appropriate information. The mode constant can be one of NODE_LABEL_MODE_NEVER, NODE_LABEL_MODE_CONSIDER_FOR_SELF_LOOPS, NODE_LABEL_MODE_CONSIDER_FOR_DRAWING, or NODE_LABEL_MODE_CONSIDER_FOR_ROUTING.
public function get nodeLabelMode():int
public function set nodeLabelMode(value:int):void
IllegalArgumentException — if the constant is unknown.
|
See also
portAssignment | property |
portAssignment:int
Specifies the assignment strategy which is used to distribute the ports on the node borders.
Note that the port assignments PORT_ASSIGNMENT_DEFAULT, PORT_ASSIGNMENT_ON_GRID and PORT_ASSIGNMENT_ON_SUBGRID are currently only supported in com.yworks.yfiles.layout.hierarchic.incremental.DefaultPortAllocator . A custom implementation of com.yworks.yfiles.layout.hierarchic.incremental.PortAllocator will have to handle these assignments itself or will replace them with its own behavior.
Note that if no grid is specified ( grid spacing (com.yworks.yfiles.layout.hierarchic.IncrementalHierarchicLayouter.gridSpacing) is smaller or equal to 0), assignment PORT_ASSIGNMENT_DEFAULT
is used.
By default PORT_ASSIGNMENT_DEFAULT is used.
public function get portAssignment():int
public function set portAssignment(value:int):void
See also
portBorderGapRatios | property |
portBorderGapRatios:Number
[write-only] Sets the port border gap ratio for the port distribution on all sides of the node.
public function set portBorderGapRatios(value:Number):void
See also
NodeLayoutDescriptor | () | Constructor |
public function NodeLayoutDescriptor(init:Boolean = true)
Creates a new instance of a NodeLayoutDescriptor using the default values.
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.
|
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getPortBorderGapRatio | () | method |
public function getPortBorderGapRatio(side:int):Number
Returns the port border gap ratio for the port distribution at the given side.
Default is 0.5d
for all sides.
Parameters
side:int — the 0-based clockwise side index for top-to-bottom layouts
|
Number — the ratio
|
initNodeLayoutDescriptor | () | method |
protected final function initNodeLayoutDescriptor():void
Initializes this object. See the documentation of the corresponding factory method newNodeLayoutDescriptor()
for details.
See also
newNodeLayoutDescriptor | () | method |
public static function newNodeLayoutDescriptor():NodeLayoutDescriptor
Creates a new instance of a NodeLayoutDescriptor using the default values.
ReturnsNodeLayoutDescriptor |
setPortBorderGapRatio | () | method |
public function setPortBorderGapRatio(side:int, ratio:Number):void
Sets the port border gap ratio for the port distribution at the given side.
Parameters
side:int — the side
| |
ratio:Number — the new ratio
|
NODE_LABEL_MODE_CONSIDER_FOR_DRAWING | Constant |
public static const NODE_LABEL_MODE_CONSIDER_FOR_DRAWING:int = 2
Byte constant used by nodeLabelMode and nodeLabelMode. This mode makes the algorithm consider node labels for node placement and routing but not for self loops.
See also
NODE_LABEL_MODE_CONSIDER_FOR_ROUTING | Constant |
public static const NODE_LABEL_MODE_CONSIDER_FOR_ROUTING:int = 3
Byte constant used by nodeLabelMode and nodeLabelMode. This mode makes the algorithm consider node labels during routing only.
See also
NODE_LABEL_MODE_CONSIDER_FOR_SELF_LOOPS | Constant |
public static const NODE_LABEL_MODE_CONSIDER_FOR_SELF_LOOPS:int = 1
Byte constant used by nodeLabelMode and nodeLabelMode. This mode makes the algorithm consider node labels for self-loops, node placement, and routing.
See also
NODE_LABEL_MODE_NEVER | Constant |
public static const NODE_LABEL_MODE_NEVER:int = 0
Byte constant used by nodeLabelMode and nodeLabelMode. This mode prevents node labels from being considered during the layout at all.
See also
PORT_ASSIGNMENT_DEFAULT | Constant |
public static const PORT_ASSIGNMENT_DEFAULT:int = 0
Port assignment specifier that describes the default port assignment strategy of com.yworks.yfiles.layout.hierarchic.IncrementalHierarchicLayouter. The ports are distributed evenly at the border of the node.
See also
PORT_ASSIGNMENT_ON_GRID | Constant |
public static const PORT_ASSIGNMENT_ON_GRID:int = 1
Port assignment specifier that describes a port assignment strategy which places all edges on grid lines. If there are not enough grid lines for each port, ports may overlap. In case there is no grid line available at the side of a node, the ports are placed centered at that side.
Note that this port assignment can only be used if the grid spacing (com.yworks.yfiles.layout.hierarchic.IncrementalHierarchicLayouter.gridSpacing) is greater than 0.
See also
PORT_ASSIGNMENT_ON_SUBGRID | Constant |
public static const PORT_ASSIGNMENT_ON_SUBGRID:int = 2
Port assignment specifier that describes a port assignment strategy which places all edges on grid lines or subgrid lines. If there are not enough grid lines for each port, the grid gets subdivided with subgrid lines until each edge has space for its port.
Note that this port assignment can only be used if the grid spacing (com.yworks.yfiles.layout.hierarchic.IncrementalHierarchicLayouter.gridSpacing) is greater than 0.
See also