Packagecom.yworks.yfiles.layout.router.polyline
Classpublic class SegmentInfo
InheritanceSegmentInfo Inheritance AbstractSegmentInfo Inheritance YObject Inheritance Object

Stores information about the possible location of an orthogonal edge segment. Most notable, SegmentInfo holds the segment's direction and the interval that restricts the segment's location.



Public Properties
 PropertyDefined By
  atStrongPortConstraint : Boolean
Determines whether or not this edge segment has the restriction of a strong port constraint.
SegmentInfo
 Inheriteddirection : Direction
[read-only] Returns the direction the segment of this info points to.
AbstractSegmentInfo
 Inheritededge : Edge
[read-only] Returns the edge this segment info belongs to.
AbstractSegmentInfo
 Inheritedfixed : Boolean
[read-only] Determines whether or not this segment info is fixed, that means a fixed location has been determined inside its location range (locationRange).
AbstractSegmentInfo
 Inheritedlocation : Number
Getter: Returns the fixed location inside the location range (locationRange) that has been set before.
AbstractSegmentInfo
 InheritedlocationRange : Interval
[read-only] Returns the range, the location of the segment shall be placed in.
AbstractSegmentInfo
 InheritedmaxExtension : Interval
[read-only] Returns the maximum extension this segment will stretch.
AbstractSegmentInfo
 InheritedminExtension : Interval
[read-only] The minimal known extension of the segment, that is the minimal interval this segment will cover in any case.
AbstractSegmentInfo
 InheritedpreferredAlignment : int
Specifies whether this segment prefers to be placed close to the lower bound (ALIGNMENT_MIN), upper bound (ALIGNMENT_MAX) or somewhere (ALIGNMENT_ANY) of its location range.
AbstractSegmentInfo
  segmentGroup : SegmentGroup
[override] Sets the segment group for this segment info and its cell segment infos and adjusts their locationRange s to use the com.yworks.yfiles.layout.router.polyline.SegmentGroup.commonLocationRange.
SegmentInfo
 InheritedsegmentIndex : int
[read-only] Returns the index of this info's segment.
AbstractSegmentInfo
 Inheritedvertical : Boolean
[read-only] Determines whether or not the associated segment is vertical.
AbstractSegmentInfo
Public Methods
 MethodDefined By
  
SegmentInfo(edge:Edge, segmentIndex:int, segment:LineSegment, init:Boolean = true)
Creates a new instance using a line segment to describe the edge segment.
SegmentInfo
  
Returns the number of com.yworks.yfiles.layout.router.polyline.CellSegmentInfo of this segment info.
SegmentInfo
 Inherited
equals(o:Object):Boolean
YObject
  
Returns the com.yworks.yfiles.layout.router.polyline.CellSegmentInfo at the given index of this segment info.
SegmentInfo
  
getClass():Class
[override]
SegmentInfo
 Inherited
hashCode():int
YObject
  
newSegmentInfo1(edge:Edge, segmentIndex:int, segment:LineSegment):SegmentInfo
[static] Creates a new instance using a line segment to describe the edge segment.
SegmentInfo
  
newSegmentInfo2(edge:Edge, segmentIndex:int, direction:Direction, locationRange:Interval, minExtension:Interval, maxExtension:Interval, cellSegmentInfos:List):SegmentInfo
[static] Creates a new instance for the segment.
SegmentInfo
 Inherited
toString():String
AbstractSegmentInfo
Protected Methods
 MethodDefined By
 Inherited
initAbstractSegmentInfo1(edge:Edge, segmentNo:int, segment:LineSegment):void
AbstractSegmentInfo
 Inherited
initAbstractSegmentInfo2(edge:Edge, segmentIndex:int, direction:Direction, locationRange:Interval, minExtension:Interval, maxExtension:Interval):void
AbstractSegmentInfo
  
initSegmentInfo1(edge:Edge, segmentIndex:int, segment:LineSegment):void
Initializes this object.
SegmentInfo
  
initSegmentInfo2(edge:Edge, segmentIndex:int, direction:Direction, locationRange:Interval, minExtension:Interval, maxExtension:Interval, cellSegmentInfos:List):void
Initializes this object.
SegmentInfo
Public Constants
 ConstantDefined By
 InheritedALIGNMENT_ANY : int = 0
[static] Specifies that the segment can be placed somewhere in its location range.
AbstractSegmentInfo
 InheritedALIGNMENT_MAX : int = 1
[static] Specifies that the segment prefers to be placed close to the upper bound of its location range.
AbstractSegmentInfo
 InheritedALIGNMENT_MIN : int = -1
[static] Specifies that the segment prefers to be placed close to the lower bound of its location range.
AbstractSegmentInfo
Property Detail
atStrongPortConstraintproperty
atStrongPortConstraint:Boolean

Determines whether or not this edge segment has the restriction of a strong port constraint.


Implementation
    public function get atStrongPortConstraint():Boolean
    public function set atStrongPortConstraint(value:Boolean):void
segmentGroupproperty 
segmentGroup:SegmentGroup[override]

Sets the segment group for this segment info and its cell segment infos and adjusts their locationRange s to use the com.yworks.yfiles.layout.router.polyline.SegmentGroup.commonLocationRange.


Implementation
    public function get segmentGroup():SegmentGroup
    public function set segmentGroup(value:SegmentGroup):void

See also

Constructor Detail
SegmentInfo()Constructor
public function SegmentInfo(edge:Edge, segmentIndex:int, segment:LineSegment, init:Boolean = true)

Creates a new instance using a line segment to describe the edge segment.

This constructor is meant to be used for fixed orthogonal edge segments already knowing their extension and location.

Parameters
edge:Edge — The edge this segment info belongs to.
 
segmentIndex:int — The index of the segment this info belongs to.
 
segment:LineSegment — A line segment describing the edge segment.
 
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.
Method Detail
cellSegmentInfoCount()method
public function cellSegmentInfoCount():int

Returns the number of com.yworks.yfiles.layout.router.polyline.CellSegmentInfo of this segment info.

Returns
int — the number of com.yworks.yfiles.layout.router.polyline.CellSegmentInfo of this segment info

See also

getCellSegmentInfo()method 
public function getCellSegmentInfo(index:int):CellSegmentInfo

Returns the com.yworks.yfiles.layout.router.polyline.CellSegmentInfo at the given index of this segment info.

Parameters

index:int — index of the com.yworks.yfiles.layout.router.polyline.CellSegmentInfo to return

Returns
CellSegmentInfo — the com.yworks.yfiles.layout.router.polyline.CellSegmentInfo at the given index of this segment info

See also

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

Returns
Class
initSegmentInfo1()method 
protected final function initSegmentInfo1(edge:Edge, segmentIndex:int, segment:LineSegment):void

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

Parameters

edge:Edge
 
segmentIndex:int
 
segment:LineSegment

See also

initSegmentInfo2()method 
protected final function initSegmentInfo2(edge:Edge, segmentIndex:int, direction:Direction, locationRange:Interval, minExtension:Interval, maxExtension:Interval, cellSegmentInfos:List):void

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

Parameters

edge:Edge
 
segmentIndex:int
 
direction:Direction
 
locationRange:Interval
 
minExtension:Interval
 
maxExtension:Interval
 
cellSegmentInfos:List

See also

newSegmentInfo1()method 
public static function newSegmentInfo1(edge:Edge, segmentIndex:int, segment:LineSegment):SegmentInfo

Creates a new instance using a line segment to describe the edge segment.

This constructor is meant to be used for fixed orthogonal edge segments already knowing their extension and location.

Parameters

edge:Edge — The edge this segment info belongs to.
 
segmentIndex:int — The index of the segment this info belongs to.
 
segment:LineSegment — A line segment describing the edge segment.

Returns
SegmentInfo
newSegmentInfo2()method 
public static function newSegmentInfo2(edge:Edge, segmentIndex:int, direction:Direction, locationRange:Interval, minExtension:Interval, maxExtension:Interval, cellSegmentInfos:List):SegmentInfo

Creates a new instance for the segment.

Parameters

edge:Edge — The edge the segment of this info belongs to.
 
segmentIndex:int — The index of the segment this info belongs to.
 
direction:Direction — The direction the segment points to.
 
locationRange:Interval — The range the common location of this segment has to be inside.
 
minExtension:Interval — The minimal interval in extension direction this segment is known to intersect.
 
maxExtension:Interval — The maximum interval in extension direction this segment will span.
 
cellSegmentInfos:List — A list of cell segment infos this segment info is build upon.

Returns
SegmentInfo