public class SegmentInfo extends AbstractSegmentInfo
SegmentInfo holds information about the possible location of an orthogonal edge segment.
Most notably, it stores the direction of the segment and the interval
that restricts the location of the segment.
| Constructor and Description |
|---|
SegmentInfo(Edge edge,
int segmentIndex,
Direction direction,
Interval locationRange,
Interval minExtension,
Interval maxExtension,
List<Object> cellSegmentInfos)
Creates a new instance of
SegmentInfo with the given information. |
SegmentInfo(Edge edge,
int segmentIndex,
LineSegment segment)
Creates a new instance of
SegmentInfo using a LineSegment to describe the edge segment. |
| Modifier and Type | Method and Description |
|---|---|
int |
cellSegmentInfoCount()
Returns the number of
CellSegmentInfo of this segment info. |
CellSegmentInfo |
getCellSegmentInfo(int index)
Returns the
CellSegmentInfo at the given index of this segment info. |
boolean |
isAtStrongPortConstraint()
Gets whether or not this edge segment has the restriction of a strong
PortConstraint. |
void |
setAtStrongPortConstraint(boolean value)
Sets whether or not this edge segment has the restriction of a strong
PortConstraint. |
void |
setSegmentGroup(SegmentGroup value)
Sets the
segment group for this segment info and its associated CellSegmentInfos. |
getDirection, getEdge, getLocation, getLocationRange, getMaxExtension, getMinExtension, getPreferredAlignment, getSegmentGroup, getSegmentIndex, isFixed, isVertical, setLocation, setPreferredAlignment, toStringpublic SegmentInfo(Edge edge, int segmentIndex, Direction direction, Interval locationRange, Interval minExtension, Interval maxExtension, List<Object> cellSegmentInfos)
SegmentInfo with the given information.edge - the edge to which the segment of this info belongssegmentIndex - the index of the segment to which this info belongsdirection - the direction to which the segment of this info pointslocationRange - the range within which the common location of this segment has to lieminExtension - the minimum interval in extension direction this segment is known to intersectmaxExtension - the maximum interval in extension direction this segment will spancellSegmentInfos - the list of CellSegmentInfo objects upon which this segment info is builtpublic SegmentInfo(Edge edge, int segmentIndex, LineSegment segment)
SegmentInfo using a LineSegment to describe the edge segment.edge - the edge to which the segment of this info belongssegmentIndex - the index of the segment to which this info belongssegment - a line segment describing the edge segmentpublic int cellSegmentInfoCount()
CellSegmentInfo of this segment info.CellSegmentInfo of this segment infopublic CellSegmentInfo getCellSegmentInfo(int index)
CellSegmentInfo at the given index of this segment info.index - the index of the CellSegmentInfo to returnCellSegmentInfo at the given index of this segment infopublic boolean isAtStrongPortConstraint()
PortConstraint.true if this edge segment has the restriction of a strong PortConstraint, false
otherwisesetAtStrongPortConstraint(boolean)public void setAtStrongPortConstraint(boolean value)
PortConstraint.value - true if this edge segment has the restriction of a strong PortConstraint, false
otherwiseisAtStrongPortConstraint()public void setSegmentGroup(SegmentGroup value)
segment group for this segment info and its associated CellSegmentInfos.
The location ranges are adjusted to use the
CommonLocationRange.
setSegmentGroup in class AbstractSegmentInfovalue - the segment group to which this segment info shall belongSegmentGroup