|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.router.polyline.EdgeInfo
public class EdgeInfo
This class encapsulates the information required to route an edge with a path routing algorithm.
ChannelBasedPathRouting
Constructor Summary | |
---|---|
EdgeInfo(Edge edge,
Path path,
PathSearchConfiguration configuration)
Creates a new EdgeInfo instance. |
Method Summary | |
---|---|
LineSegment[] |
calculateLineSegments()
Calculates an array of LineSegment s created by the calculated path points . |
YList |
calculatePathPoints()
Calculates a list of YPoint s containing the source port, bend and target port locations. |
Edge |
getEdge()
Returns the edge whose route is described by this EdgeInfo instance. |
EdgeCellInfo |
getEdgeCellInfo(CellEntrance entrance)
Returns the EdgeCellInfo of the given CellEntrance in the path. |
java.util.List |
getEdgeCellInfos()
Returns a list of EdgeCellInfo s describing how the edge traverses each PartitionCell on its path. |
SegmentInfo |
getNextSegment(SegmentInfo segment)
Returns the SegmentInfo of the segment following the segment of the given SegmentInfo . |
SegmentInfo |
getPreviousSegment(SegmentInfo segment)
Returns the SegmentInfo of the segment preceding the segment of the given SegmentInfo . |
SegmentInfo |
getSegmentInfo(int segmentIndex)
Returns the SegmentInfo of the edge segment with the given index. |
YPoint |
getStrongSourcePort()
Returns the location of the strong source port that the edge uses. |
YPoint |
getStrongTargetPort()
Returns the location of the strong target port that the edge uses. |
boolean |
isFixed()
Returns whether the path of this edge is fixed or should be routed by the path search
algorithm. |
int |
segmentCount()
Returns the number of segments of the edge. |
void |
setStrongSourcePort(YPoint portLocation)
Specifies the location of the strong source port that the edge uses. |
void |
setStrongTargetPort(YPoint portLocation)
Specifies the location of the strong target port that the edge uses. |
java.lang.String |
toString()
Returns a string representation of this EdgeInfo object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EdgeInfo(Edge edge, Path path, PathSearchConfiguration configuration)
EdgeInfo
instance.
edge
- the edge to create the info forpath
- the path that will be used for routing the edgeconfiguration
- the configuration
of the path search algorithmMethod Detail |
---|
public boolean isFixed()
edge
is fixed or should be routed by the path search
algorithm.
true
if the path of this edge
is fixed,
false
if it should be routed by the path search algorithmpublic Edge getEdge()
EdgeInfo
instance.
EdgeInfo
instancepublic java.util.List getEdgeCellInfos()
EdgeCellInfo
s describing how the edge traverses each PartitionCell
on its path.
EdgeCellInfo
s describing how the edge traverses each partition cell on its pathpublic EdgeCellInfo getEdgeCellInfo(CellEntrance entrance)
EdgeCellInfo
of the given CellEntrance
in the path.
entrance
- the entrance for which the EdgeCellInfo
will be returned
EdgeCellInfo
of the given CellEntrance
in the pathpublic SegmentInfo getSegmentInfo(int segmentIndex)
SegmentInfo
of the edge segment with the given index.
segmentIndex
- the index of the edge segment for which the segment info will be returned
SegmentInfo
of the edge segment with the given indexpublic SegmentInfo getPreviousSegment(SegmentInfo segment)
SegmentInfo
of the segment preceding the segment of the given SegmentInfo
.
segment
- the segment info for which the previous segment info will be returned
public SegmentInfo getNextSegment(SegmentInfo segment)
SegmentInfo
of the segment following the segment of the given SegmentInfo
.
segment
- the segment info for which the next segment info will be returned
public int segmentCount()
public java.lang.String toString()
EdgeInfo
object.
toString
in class java.lang.Object
EdgeInfo
objectpublic YPoint getStrongSourcePort()
Defining a new strong source port also updates the first SegmentInfo
to use this fixed port location.
null
if no strong source port has been setsetStrongSourcePort(YPoint)
,
AbstractSegmentInfo.setLocation(double)
,
SegmentInfo.setAtStrongPortConstraint(boolean)
public void setStrongSourcePort(YPoint portLocation)
Defining a new strong source port also updates the first SegmentInfo
to use this fixed port location.
portLocation
- the strong source port location
java.lang.IllegalArgumentException
- if the first segment is already fixed and the given port location contradicts
the segment's fixed locationAbstractSegmentInfo.setLocation(double)
,
SegmentInfo.setAtStrongPortConstraint(boolean)
public YPoint getStrongTargetPort()
Defining a new strong target port also updates the last SegmentInfo
to use this fixed port location.
null
if no strong target port has been setsetStrongTargetPort(YPoint)
,
AbstractSegmentInfo.setLocation(double)
,
SegmentInfo.setAtStrongPortConstraint(boolean)
public void setStrongTargetPort(YPoint portLocation)
Defining a new strong target port also updates the last SegmentInfo
to use this fixed port location.
portLocation
- the strong target port location
java.lang.IllegalArgumentException
- if the last segment is already fixed and the given port location contradicts
the segment's fixed locationAbstractSegmentInfo.setLocation(double)
,
SegmentInfo.setAtStrongPortConstraint(boolean)
public LineSegment[] calculateLineSegments()
LineSegment
s created by the calculated path points
.
LineSegment
s created by the calculated path pointspublic YList calculatePathPoints()
YPoint
s containing the source port, bend and target port locations.
YPoint
s containing the source port, bend and target port locations
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |