Search this API

y.layout.router.polyline
Class SegmentGroup

java.lang.Object
  extended by y.layout.router.polyline.SegmentGroup

public class SegmentGroup
extends java.lang.Object

Represents a group of segments of different edges that shall be combined at their common source or target.

Grouped edges have the same source or target group ID assigned in the DataProvider registered with the graph with PortConstraintKeys.SOURCE_GROUPID_KEY or PortConstraintKeys.TARGET_GROUPID_KEY keys.

The SegmentGroup contains the common location range for the edge group and provides a common segment info representing the grouped segments.

 
Your browser does not support SVG content.

Constructor Summary
SegmentGroup(Interval commonLocationRange, java.util.List segmentInfos)
          Creates a new instance of SegmentGroup that contains the given segments and a range to place them.
 
Method Summary
 Interval getCommonLocationRange()
          Returns the common location range for the segments in this group.
 SegmentInfo getCommonSegmentInfo()
          Returns the common SegmentInfo representing the grouped segments.
 java.util.List getSegmentInfos()
          Returns the list of SegmentInfos contained in this group.
 int hashCode()
          Returns the hash code for this SegmentGroup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SegmentGroup

public SegmentGroup(Interval commonLocationRange,
                    java.util.List segmentInfos)
Creates a new instance of SegmentGroup that contains the given segments and a range to place them.

Parameters:
commonLocationRange - the location range of the given SegmentInfos
segmentInfos - the list containing the grouped SegmentInfos
Method Detail

getCommonLocationRange

public Interval getCommonLocationRange()
Returns the common location range for the segments in this group.

For vertical grouped segments, this interval describes the horizontal range where this segment can be placed. Horizontal grouped segments are placed in a vertical range.

Returns:
the common location range for the segments in this group

getSegmentInfos

public java.util.List getSegmentInfos()
Returns the list of SegmentInfos contained in this group.

Returns:
the list of SegmentInfos contained in this group

getCommonSegmentInfo

public SegmentInfo getCommonSegmentInfo()
Returns the common SegmentInfo representing the grouped segments.

The returned segment info is used for placing the common segment. The coordinates are applied to all edges in the bundle later.

Returns:
the common segment info representing the grouped segments

hashCode

public int hashCode()
Returns the hash code for this SegmentGroup.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code for this SegmentGroup

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.