Packagecom.yworks.yfiles.layout.router.polyline
Classpublic class AbstractSegmentInfo
InheritanceAbstractSegmentInfo Inheritance YObject Inheritance Object
Subclasses CellSegmentInfo, SegmentInfo

Stores location information for orthogonal edge segments.

Most notably, AbstractSegmentInfo stores direction, segment points and intervals describing possible location and extension of a segment.



Public Properties
 PropertyDefined By
  direction : Direction
[read-only] Returns the direction the segment of this info points to.
AbstractSegmentInfo
  edge : Edge
[read-only] Returns the edge this segment info belongs to.
AbstractSegmentInfo
  fixed : 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
  location : Number
Getter: Returns the fixed location inside the location range (locationRange) that has been set before.
AbstractSegmentInfo
  locationRange : Interval
[read-only] Returns the range, the location of the segment shall be placed in.
AbstractSegmentInfo
  maxExtension : Interval
[read-only] Returns the maximum extension this segment will stretch.
AbstractSegmentInfo
  minExtension : Interval
[read-only] The minimal known extension of the segment, that is the minimal interval this segment will cover in any case.
AbstractSegmentInfo
  preferredAlignment : 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
Getter: Returns the segment group this segment info belongs to or null if this segment info doesn't belong to any group.
AbstractSegmentInfo
  segmentIndex : int
[read-only] Returns the index of this info's segment.
AbstractSegmentInfo
  vertical : Boolean
[read-only] Determines whether or not the associated segment is vertical.
AbstractSegmentInfo
Public Methods
 MethodDefined By
  
AbstractSegmentInfo(edge:Edge, segmentNo:int, segment:LineSegment, init:Boolean = true)
Creates a new instance using a line segment to describe the edge segment.
AbstractSegmentInfo
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
AbstractSegmentInfo
 Inherited
hashCode():int
YObject
  
toString():String
AbstractSegmentInfo
Protected Methods
 MethodDefined By
  
initAbstractSegmentInfo1(edge:Edge, segmentNo:int, segment:LineSegment):void
AbstractSegmentInfo
  
initAbstractSegmentInfo2(edge:Edge, segmentIndex:int, direction:Direction, locationRange:Interval, minExtension:Interval, maxExtension:Interval):void
AbstractSegmentInfo
Public Constants
 ConstantDefined By
  ALIGNMENT_ANY : int = 0
[static] Specifies that the segment can be placed somewhere in its location range.
AbstractSegmentInfo
  ALIGNMENT_MAX : int = 1
[static] Specifies that the segment prefers to be placed close to the upper bound of its location range.
AbstractSegmentInfo
  ALIGNMENT_MIN : int = -1
[static] Specifies that the segment prefers to be placed close to the lower bound of its location range.
AbstractSegmentInfo
Property Detail
directionproperty
direction:Direction  [read-only]

Returns the direction the segment of this info points to.


Implementation
    public function get direction():Direction
edgeproperty 
edge:Edge  [read-only]

Returns the edge this segment info belongs to.


Implementation
    public function get edge():Edge
fixedproperty 
fixed: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).


Implementation
    public function get fixed():Boolean

See also

locationproperty 
location:Number

Getter: Returns the fixed location inside the location range (locationRange) that has been set before.

For horizontal segments, this is the vertical location; for vertical segments, this is the horizontal location.

Setter: Sets a fixed location for this segment info. This location has to be inside the segment infos location range.


Implementation
    public function get location():Number
    public function set location(value:Number):void

Throws
Error — If the segment info already has a fixed location.
 
IllegalArgumentException — If the given location isn't inside the location range.

See also

locationRangeproperty 
locationRange:Interval  [read-only]

Returns the range, the location of the segment shall be placed in.

For horizontal segments, this is the range containing the vertical location; for vertical segment this is the range containing the horizontal location.


Implementation
    public function get locationRange():Interval
maxExtensionproperty 
maxExtension:Interval  [read-only]

Returns the maximum extension this segment will stretch.

For horizontal intervals, this is the maximum horizontal extension; for vertical intervals, this is the maximum vertical extension.


Implementation
    public function get maxExtension():Interval
minExtensionproperty 
minExtension:Interval  [read-only]

The minimal known extension of the segment, that is the minimal interval this segment will cover in any case.

For horizontal intervals, this is the minimal horizontal extension; for vertical intervals, this is the minimal vertical extension.


Implementation
    public function get minExtension():Interval
preferredAlignmentproperty 
preferredAlignment: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.


Implementation
    public function get preferredAlignment():int
    public function set preferredAlignment(value:int):void

See also

segmentGroupproperty 
segmentGroup:SegmentGroup

Getter: Returns the segment group this segment info belongs to or null if this segment info doesn't belong to any group.

Setter: Sets the segment group this segment info belongs to and adjusts the location range (locationRange) to use the common interval of the group.


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

See also

segmentIndexproperty 
segmentIndex:int  [read-only]

Returns the index of this info's segment.


Implementation
    public function get segmentIndex():int
verticalproperty 
vertical:Boolean  [read-only]

Determines whether or not the associated segment is vertical.


Implementation
    public function get vertical():Boolean
Constructor Detail
AbstractSegmentInfo()Constructor
public function AbstractSegmentInfo(edge:Edge, segmentNo: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.

Parameters
edge:Edge — The edge this segment info belongs to.
 
segmentNo:int — The number 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
getClass()method
override public function getClass():Class

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

Parameters

edge:Edge
 
segmentNo:int
 
segment:LineSegment

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

Parameters

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

toString()method 
public function toString():String

Returns
String
Constant Detail
ALIGNMENT_ANYConstant
public static const ALIGNMENT_ANY:int = 0

Specifies that the segment can be placed somewhere in its location range.

See also

ALIGNMENT_MAXConstant 
public static const ALIGNMENT_MAX:int = 1

Specifies that the segment prefers to be placed close to the upper bound of its location range.

See also

ALIGNMENT_MINConstant 
public static const ALIGNMENT_MIN:int = -1

Specifies that the segment prefers to be placed close to the lower bound of its location range.

See also