|
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
A channel is 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 containing 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 the given SegmentInfo is assigned inside its location range . |
Interval |
getLengthInterval()
Returns an interval spanning the union of the segment infos' maximum extension. |
SegmentInfo |
getSegment(int index)
Returns the SegmentInfo with the given index in the segments list. |
SegmentGroup |
getSegmentGroup(int index)
Returns the segment group with the given index of this channel. |
Interval |
getWidthInterval()
Returns an interval spanning the union of the segment infos' location ranges. |
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)
Sets the current location the given SegmentInfo is assigned inside its location range . |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Channel(SegmentInfo segment)
segment
- The segment info the channel shall be created for.Method Detail |
---|
public void addSegment(SegmentInfo segment)
IllegalArgumentException
- If the given segment has a different orientation then the segments already
contained in the channel.segment
- The segment info to add to this channel.public Interval getWidthInterval()
AbstractSegmentInfo.getLocationRange()
public Interval getLengthInterval()
AbstractSegmentInfo.getMaxExtension()
public int segmentCount()
public boolean isVertical()
true
if the segments in this channel are vertical, false
otherwise.public SegmentInfo getSegment(int index)
index
- The index of the segment in the list.
public int segmentGroupCount()
public void addSegmentGroup(SegmentGroup group)
group
- segment group to addpublic SegmentGroup getSegmentGroup(int index)
index
- index of the segment group to return
public double getCurrentLocation(SegmentInfo segmentInfo)
SegmentInfo
is assigned inside its location range
.
segmentInfo
- The segmentInfo to return the current location for.
Double.NaN
if no location was set before.public void setCurrentLocation(SegmentInfo segmentInfo, double location)
SegmentInfo
is assigned inside its location range
.
During the distribution of the segments in the channel, different locations can be assigned and only the last one is finally set at the segment info.
segmentInfo
- The segment info to set the current location for.location
- The current location of the segment info in its location range.AbstractSegmentInfo.setLocation(double)
public YRectangle getBounds()
width
and length
.
getWidthInterval()
,
getLengthInterval()
public String toString()
toString
in class Object
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |