| 
 | Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.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 SegmentInfos describing 
   their path.
 
| Constructor Summary | |
|---|---|
| Channel(SegmentInfo segment)Creates a new Channelthat contains the givensegment info. | |
| Method Summary | |
|---|---|
|  void | addSegment(SegmentInfo segment)Adds a new segment infoto thechannel. | 
|  void | addSegmentGroup(SegmentGroup group)Adds a segment groupto thischannel. | 
|  YRectangle | getBounds()Returns the bounds of this channel. | 
|  double | getCurrentLocation(SegmentInfo segmentInfo)Returns the current location that the given segment infohas been assigned within itslocation range. | 
|  Interval | getLengthInterval()Returns an intervalspanning the union of the maximum extension of thesegment infos. | 
|  SegmentInfo | getSegment(int index)Returns the segment infowith the given index in the list of segments of thischannel. | 
|  SegmentGroup | getSegmentGroup(int index)Returns the segment groupwith the given index in thischannel. | 
|  Interval | getWidthInterval()Returns an intervalspanning the union of the location ranges of thesegment infos. | 
|  boolean | isVertical()Determines whether or not the segments in this channelare vertical. | 
|  int | segmentCount()Returns the number of segment infosin this channel. | 
|  int | segmentGroupCount()Returns the number of segment groupsin thischannel. | 
|  void | setCurrentLocation(SegmentInfo segmentInfo,
                   double location)Specifies the current location that the given segment infohas been assigned within itslocation range. | 
|  java.lang.String | toString()Returns a string representation of this Channelobject. | 
| 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 channel| Method 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.ObjectChannel object| 
 | © Copyright 2000-2025, yWorks GmbH. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||