Package | com.yworks.yfiles.layout.hierarchic.incremental |
Class | public class DefaultPortAllocator |
Inheritance | DefaultPortAllocator YObject Object |
Implements | PortAllocator |
Property | Defined By | ||
---|---|---|---|
defaultPortBorderGapRatio : Number
Getter:
Returns the default port to border gap ratio. | DefaultPortAllocator |
Method | Defined By | ||
---|---|---|---|
DefaultPortAllocator(init:Boolean = true)
Creates a new instance of DefaultPortAllocator with default settings
| DefaultPortAllocator | ||
Assigns the port positions for the drawer. | DefaultPortAllocator | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | DefaultPortAllocator | ||
hashCode():int | YObject | ||
[static]
Creates a new instance of DefaultPortAllocator with default settings
| DefaultPortAllocator |
Method | Defined By | ||
---|---|---|---|
getPortBorderGap(graph:LayoutGraph, ldp:LayoutDataProvider, node:Node, sideIndex:int, sideLength:Number, edgeCount:int):Number
Callback method used to determine the port border gap for each node and side. | DefaultPortAllocator | ||
getPortBorderGapRatio(graph:LayoutGraph, ldp:LayoutDataProvider, node:Node, sideIndex:int, sideLength:Number, edgeCount:int):Number
Callback method used to determine the port border gap ratio. | DefaultPortAllocator | ||
getPortDistanceDelta(graph:LayoutGraph, ldp:LayoutDataProvider, node:Node, sideIndex:int, sideLength:Number, edgeCount:int, portBorderGap:Number):Number
Callback method used to determine the distance between two adjacent ports
| DefaultPortAllocator | ||
initDefaultPortAllocator():void
Initializes this object. | DefaultPortAllocator |
defaultPortBorderGapRatio | property |
defaultPortBorderGapRatio:Number
Getter: Returns the default port to border gap ratio.
Setter: Sets for default port to border gap ratio. This ratio determines the gap between a corner of the node and the first assigned port. A value of0.0d
results in ports being placed directly on the corner of the node (if there is more than one port). The default value of 0.5d
results in ports being distributed along the side of the node so that the distance between the corner of the node and the first port is half as wide as the distance between two adjacent ports. A value of Double.POSITIVE_INFINITY
results in all ports being centered at the side in one point.
public function get defaultPortBorderGapRatio():Number
public function set defaultPortBorderGapRatio(value:Number):void
DefaultPortAllocator | () | Constructor |
public function DefaultPortAllocator(init:Boolean = true)
Creates a new instance of DefaultPortAllocator with default settings
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.
|
See also
assignPorts | () | method |
public function assignPorts(graph:LayoutGraph, layers:Layers, ldp:LayoutDataProvider, itemFactory:ItemFactory):void
Assigns the port positions for the drawer. Assigns com.yworks.yfiles.layout.PortConstraint.ANY_SIDE ports to appropriate sides. Assigns weak (com.yworks.yfiles.layout.PortConstraint.strong) ports to appropriate positions between strong ones
Parameters
graph:LayoutGraph — the graph
| |
layers:Layers — the layering
| |
ldp:LayoutDataProvider — the LayoutDataProvider that can be used to query information
| |
itemFactory:ItemFactory — the ItemFactory that can be used for temporarily altering the graph
|
See also
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getPortBorderGap | () | method |
protected function getPortBorderGap(graph:LayoutGraph, ldp:LayoutDataProvider, node:Node, sideIndex:int, sideLength:Number, edgeCount:int):Number
Callback method used to determine the port border gap for each node and side.
Parameters
graph:LayoutGraph — the graph
| |
ldp:LayoutDataProvider — the LayoutDataProvider that can be used to query information from
| |
node:Node — the node
| |
sideIndex:int — the zero based (top is 0) clock-wise index of the side of the node (for top-to-bottom layouts)
| |
sideLength:Number — the width/height of the side
| |
edgeCount:int — the number of edges/port that connect to this side
|
Number — the absolute gap to be used on both sides of the ports
|
See also
getPortBorderGapRatio | () | method |
protected function getPortBorderGapRatio(graph:LayoutGraph, ldp:LayoutDataProvider, node:Node, sideIndex:int, sideLength:Number, edgeCount:int):Number
Callback method used to determine the port border gap ratio. See defaultPortBorderGapRatio for an explanation. This implementation returns the same value as defaultPortBorderGapRatio does.
Parameters
graph:LayoutGraph — the graph
| |
ldp:LayoutDataProvider — the LayoutDataProvider that can be used to query information from
| |
node:Node — the node
| |
sideIndex:int — the zero based (top is 0) clock-wise index of the side of the node (for top-to-bottom layouts)
| |
sideLength:Number — the width/height of the side
| |
edgeCount:int — the number of edges/port that connect to this side
|
Number — the ratio
|
See also
getPortDistanceDelta | () | method |
protected function getPortDistanceDelta(graph:LayoutGraph, ldp:LayoutDataProvider, node:Node, sideIndex:int, sideLength:Number, edgeCount:int, portBorderGap:Number):Number
Callback method used to determine the distance between two adjacent ports
Parameters
graph:LayoutGraph — the graph
| |
ldp:LayoutDataProvider — the LayoutDataProvider that can be used to query information from
| |
node:Node — the node
| |
sideIndex:int — the zero based (top is 0) clock-wise index of the side of the node (for top-to-bottom layouts)
| |
sideLength:Number — the width/height of the side
| |
edgeCount:int — the number of edges/port that connect to this side
| |
portBorderGap:Number — the previously calculated port border gap
|
Number — the absolute distance to be used between two adjacent ports
|
initDefaultPortAllocator | () | method |
protected final function initDefaultPortAllocator():void
Initializes this object. See the documentation of the corresponding factory method newDefaultPortAllocator()
for details.
See also
newDefaultPortAllocator | () | method |
public static function newDefaultPortAllocator():DefaultPortAllocator
Creates a new instance of DefaultPortAllocator with default settings
ReturnsDefaultPortAllocator |
See also