Package | com.yworks.yfiles.layout.router |
Class | public class ChannelRouter |
Inheritance | ChannelRouter YObject Object |
Property | Defined By | ||
---|---|---|---|
epsilon : Number
Specifies the current epsilon value. | ChannelRouter | ||
epsilonChannelIgnored : Boolean
Getter:
Returns whether subchannels shorter than epsilon are ignored by this instance. | ChannelRouter | ||
subChannelCount : int [read-only]
Returns the number of subchannels within this channel. | ChannelRouter |
Method | Defined By | ||
---|---|---|---|
ChannelRouter(min:Number, max:Number, init:Boolean = true)
Creates a new instance of ChannelRouter for a horizontal channel. | ChannelRouter | ||
Adds an edge object that belongs to a group of edges with source and target coordinates to the set of edges that have to be routed within the channel Edges sharing the same groupId will be placed on the same channel. | ChannelRouter | ||
Adds an edge object with source and target coordinates to the set of edges that have to be routed within the channel
| ChannelRouter | ||
containsGroupKey(groupKey:Object):Boolean
Determines if the given key has been registered as a grouping key with this instance. | ChannelRouter | ||
containsKey(key:Object):Boolean
Determines if the given key has been registered already with this instance. | ChannelRouter | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | ChannelRouter | ||
getCoord(key:Object):Number
Returns the calculated channel coordinate for an added edge object. | ChannelRouter | ||
getGroupSubChannelRank(groupKey:Object):int
Returns the subchannel rank for the group indicated by the groupKey. | ChannelRouter | ||
getSubChannelRank(key:Object):int
Returns the subchannel rank of this segment within the channel. | ChannelRouter | ||
hashCode():int | YObject | ||
newChannelRouter1(min:Number, max:Number):ChannelRouter [static]
Creates a new instance of ChannelRouter for a horizontal channel. | ChannelRouter | ||
newChannelRouter2(min:Number, max:Number, orientation:int):ChannelRouter [static]
Creates a new instance of ChannelRouter. | ChannelRouter | ||
route():void
Routes all added edges within the specified channel. | ChannelRouter | ||
Returns an iterator over all added segment keys. | ChannelRouter | ||
setChannel(min:Number, max:Number, orientation:int):void
Sets the channel bounds and direction. | ChannelRouter |
Method | Defined By | ||
---|---|---|---|
initChannelRouter1(min:Number, max:Number):void
Initializes this object. | ChannelRouter | ||
initChannelRouter2(min:Number, max:Number, orientation:int):void
Initializes this object. | ChannelRouter |
Constant | Defined By | ||
---|---|---|---|
ROUTE_HORIZONTAL : int = 1 [static]
Channel orientation specifier. | ChannelRouter | ||
ROUTE_VERTICAL : int = 0 [static]
Channel orientation specifier. | ChannelRouter |
epsilon | property |
epsilon:Number
Specifies the current epsilon value.
Subchannel lengths smaller than this value will be ignored by this instance if the the epsilonChannelIgnored
property is set to true
public function get epsilon():Number
public function set epsilon(value:Number):void
See also
epsilonChannelIgnored | property |
epsilonChannelIgnored:Boolean
Getter:
Returns whether subchannels shorter than epsilon
are ignored by this instance.
true
with an epsilon value of 0.5d.
public function get epsilonChannelIgnored():Boolean
public function set epsilonChannelIgnored(value:Boolean):void
See also
subChannelCount | property |
subChannelCount:int
[read-only]
Returns the number of subchannels within this channel.
The return value 0
indicates that there are no subchannels present.
public function get subChannelCount():int
ChannelRouter | () | Constructor |
public function ChannelRouter(min:Number, max:Number, init:Boolean = true)
Creates a new instance of ChannelRouter for a horizontal channel.
Parametersmin:Number — the smallest assignable coordinate within the channel
| |
max:Number — the largest assignable coordinate within the channel
| |
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.
|
addGroupSegment | () | method |
public function addGroupSegment(key:Object, groupId:Object, p1:YPoint, p2:YPoint):void
Adds an edge object that belongs to a group of edges with source and target coordinates to the set of edges that have to be routed within the channel Edges sharing the same groupId will be placed on the same channel.
Parameters
key:Object | |
groupId:Object | |
p1:YPoint | |
p2:YPoint |
addSegment | () | method |
public function addSegment(key:Object, p1:YPoint, p2:YPoint):void
Adds an edge object with source and target coordinates to the set of edges that have to be routed within the channel
Parameters
key:Object | |
p1:YPoint | |
p2:YPoint |
containsGroupKey | () | method |
public function containsGroupKey(groupKey:Object):Boolean
Determines if the given key has been registered as a grouping key with this instance.
Parameters
groupKey:Object — the key which is used in addGroupSegment()
|
Boolean |
See also
containsKey | () | method |
public function containsKey(key:Object):Boolean
Determines if the given key has been registered already with this instance.
Parameters
key:Object — the key which is used in addSegment()
|
Boolean |
See also
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getCoord | () | method |
public function getCoord(key:Object):Number
Returns the calculated channel coordinate for an added edge object.
If for example the router was instantiated with the arguments ChannelRouter(100,200,ChannelRouter.ROUTE_HORIZONTAL)
then the returned coordinate is an x-coordinate between 100 and 200. This coordinate represents the x-coordinate of two additional bends that are needed to route the edge orthogonally from p1 to p2 (as specified in addSegment).
Parameters
key:Object — an edge object added with addSegment()
|
Number |
See also
getGroupSubChannelRank | () | method |
public function getGroupSubChannelRank(groupKey:Object):int
Returns the subchannel rank for the group indicated by the groupKey.
Parameters
groupKey:Object |
int |
See also
getSubChannelRank | () | method |
public function getSubChannelRank(key:Object):int
Returns the subchannel rank of this segment within the channel.
Parameters
key:Object — an edge object added with addSegment()
|
int |
See also
initChannelRouter1 | () | method |
protected final function initChannelRouter1(min:Number, max:Number):void
Initializes this object. See the documentation of the corresponding factory method newChannelRouter1()
for details.
Parameters
min:Number | |
max:Number |
See also
initChannelRouter2 | () | method |
protected final function initChannelRouter2(min:Number, max:Number, orientation:int):void
Initializes this object. See the documentation of the corresponding factory method newChannelRouter2()
for details.
Parameters
min:Number | |
max:Number | |
orientation:int |
See also
newChannelRouter1 | () | method |
public static function newChannelRouter1(min:Number, max:Number):ChannelRouter
Creates a new instance of ChannelRouter for a horizontal channel.
Parameters
min:Number — the smallest assignable coordinate within the channel
| |
max:Number — the largest assignable coordinate within the channel
|
ChannelRouter |
newChannelRouter2 | () | method |
public static function newChannelRouter2(min:Number, max:Number, orientation:int):ChannelRouter
Creates a new instance of ChannelRouter.
Parameters
min:Number — the smallest assignable coordinate within the channel
| |
max:Number — the largest assignable coordinate within the channel
| |
orientation:int — the direction of the channel. One of ROUTE_VERTICAL and ROUTE_HORIZONTAL
|
ChannelRouter |
See also
route | () | method |
public function route():void
Routes all added edges within the specified channel. The resulting subchannels can then be queried using the getSubChannelRank() method.
See also
segmentKeys | () | method |
public function segmentKeys():Iterator
Returns an iterator over all added segment keys. For grouped edges, a com.yworks.yfiles.base.YList instance will be returned.
ReturnsIterator |
See also
setChannel | () | method |
public function setChannel(min:Number, max:Number, orientation:int):void
Sets the channel bounds and direction. A call to this method implies that all previously added segments will be removed.
Parameters
min:Number — the smallest assignable coordinate within the channel
| |
max:Number — the largest assignable coordinate within the channel
| |
orientation:int — the orientation of the channel. One of ROUTE_VERTICAL and ROUTE_HORIZONTAL
|
See also
ROUTE_HORIZONTAL | Constant |
public static const ROUTE_HORIZONTAL:int = 1
Channel orientation specifier. Used to route edges in a horizontal channel.
ROUTE_VERTICAL | Constant |
public static const ROUTE_VERTICAL:int = 0
Channel orientation specifier. Used to route edges in a vertical channel.