|
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.Channel
public class Channel
This class describes a channel, i.e., a set of vertical or horizontal edge segments whose locations depend on each other.
Channels are used by the ChannelBasedPathRouting
to route edges using SegmentInfo
s describing
their path.
Constructor Summary | |
---|---|
Channel(SegmentInfo segment)
Creates a new Channel that contains the given segment info . |
Method Summary | |
---|---|
void |
addSegment(SegmentInfo segment)
Adds a new segment info to the channel . |
void |
addSegmentGroup(SegmentGroup group)
Adds a segment group to this channel . |
YRectangle |
getBounds()
Returns the bounds of this channel . |
double |
getCurrentLocation(SegmentInfo segmentInfo)
Returns the current location that the given segment info has been assigned within its location range . |
Interval |
getLengthInterval()
Returns an interval spanning the union of the maximum extension of the segment infos . |
SegmentInfo |
getSegment(int index)
Returns the segment info with the given index in the list of segments of this channel . |
SegmentGroup |
getSegmentGroup(int index)
Returns the segment group with the given index in this channel . |
Interval |
getWidthInterval()
Returns an interval spanning the union of the location ranges of the segment infos . |
boolean |
isVertical()
Determines whether or not the segments in this channel are vertical. |
int |
segmentCount()
Returns the number of segment infos in this channel. |
int |
segmentGroupCount()
Returns the number of segment groups in this channel . |
void |
setCurrentLocation(SegmentInfo segmentInfo,
double location)
Specifies the current location that the given segment info has been assigned within its location range . |
java.lang.String |
toString()
Returns a string representation of this Channel object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Channel(SegmentInfo segment)
Channel
that contains the given segment info
.
segment
- the given segment info for which the Channel
is created
java.lang.IllegalArgumentException
- if the given segment has a different orientation than the other segments already
contained in the channelMethod Detail |
---|
public void addSegment(SegmentInfo segment)
segment info
to the channel
.
segment
- the segment info to be added to this channel
java.lang.IllegalArgumentException
- if the given segment has a different orientation than the other segments already
contained in the channelpublic Interval getWidthInterval()
interval
spanning the union of the location ranges of the segment infos
.
AbstractSegmentInfo.getLocationRange()
public Interval getLengthInterval()
interval
spanning the union of the maximum extension of the segment infos
.
AbstractSegmentInfo.getMaxExtension()
public int segmentCount()
segment infos
in this channel.
public boolean isVertical()
channel
are vertical.
true
if the segments in this channel are vertical, false
otherwisepublic SegmentInfo getSegment(int index)
segment info
with the given index in the list of segments of this channel
.
index
- the index of the segment in the list of segments
segment info
with the given index in the list of segmentspublic int segmentGroupCount()
segment groups
in this channel
.
public void addSegmentGroup(SegmentGroup group)
segment group
to this channel
.
group
- the segment group to be addedpublic SegmentGroup getSegmentGroup(int index)
segment group
with the given index in this channel
.
index
- the index of the segment group
segment group
with the given index in this channelpublic double getCurrentLocation(SegmentInfo segmentInfo)
segment info
has been assigned within its location range
.
segmentInfo
- the segment info for which the current location will be returned
Double.NaN
if no location has been assigned beforesetCurrentLocation(SegmentInfo, double)
public void setCurrentLocation(SegmentInfo segmentInfo, double location)
segment info
has been assigned within its location range
.
During the distribution of the segments in the channel, different locations can be assigned but only the last one
is finally assigned to the segment info
.
segmentInfo
- the segment info for which the current location will be setlocation
- the location of the segment info within its location rangeAbstractSegmentInfo.setLocation(double)
public YRectangle getBounds()
channel
.
These bounds are determined by the channel's width
and length
.
getWidthInterval()
,
getLengthInterval()
public java.lang.String toString()
Channel
object.
toString
in class java.lang.Object
Channel
object
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |