Search this API

y.layout.router.polyline
Class EdgeCellInfo

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

public class EdgeCellInfo
extends java.lang.Object

This class encapsulates the information that determines the route of a specific item within a specific partition cell.

 
Your browser does not support SVG content.

Field Summary
static byte TYPE_BENDING
          A routing type representing a crossing of the partition cell with a single bend, i.e., the item enters the cell in one direction, makes a bend and exits the cell in an orthogonal direction.
static byte TYPE_END
          A routing type representing the source or target end of an item being in the cell, i.e., the enter and/or exit interval is null.
static byte TYPE_STRAIGHT
          A routing type representing a straight crossing of the partition cell, i.e., a single orthogonal segment enters and exits the cell.
static byte TYPE_STRAIGHT_BENDING
          A routing type representing a crossing of the partition cell with three segments, i.e., the item enters and exits the cell using the same direction but has an orthogonal middle segment between the entering and exiting segment.
static byte TYPE_U_TURN
          A routing type representing a crossing of the partition cell by making a U-turn, i.e., the item enters and exits the cell on the same side using two turns and an orthogonal middle segment.
 
Constructor Summary
EdgeCellInfo(java.lang.Object item, PartitionCell cell, OrthogonalInterval enterInterval, OrthogonalInterval exitInterval, Direction enterDirection, Direction exitDirection, int enterSegmentNo)
          Creates a new EdgeCellInfo instance.
 
Method Summary
 int getBendCount()
          Returns the number of bends within this cell.
 PartitionCell getCell()
          Returns the partition cell within which the item is routed.
 YList getCellSegmentInfos()
          Calculates the list of CellSegmentInfos for the segment parts that lie within the associated partition cell.
 Direction getEnterDirection()
          Returns the direction in which this cell is entered.
 OrthogonalInterval getEnterInterval()
          Returns the interval that is used to enter this cell.
 SegmentGroup getEnterSegmentGroup()
          Returns the segment group containing the entering segment.
 int getEnterSegmentNo()
          Returns the index of the segment that enters this cell.
 Direction getExitDirection()
          Returns the direction in which this cell is exited.
 OrthogonalInterval getExitInterval()
          Returns the interval that is used to exit this cell.
 SegmentGroup getExitSegmentGroup()
          Returns the segment group containing the exiting segment.
 int getExitSegmentNo()
          Returns the index of the segment that exits this cell.
 java.lang.Object getItem()
          Returns the item that is routed within the partition cell.
 byte getType()
          Returns the routing type within this cell.
 void setEnterSegmentGroup(SegmentGroup enterSegmentGroup)
          Specifies the segment group containing the entering segment.
 void setEnterSegmentNo(int segmentNo)
          Specifies the index of the segment that enters this cell.
 void setExitSegmentGroup(SegmentGroup exitSegmentGroup)
          Specifies the segment group containing the exiting segment.
 void setExitSegmentNo(int segmentNo)
          Specifies the index of the segment that exits this cell.
 java.lang.String toString()
          Returns a string representation of the shape while crossing the partition cell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_STRAIGHT

public static final byte TYPE_STRAIGHT
A routing type representing a straight crossing of the partition cell, i.e., a single orthogonal segment enters and exits the cell.

See Also:
getType(), Constant Field Values

TYPE_STRAIGHT_BENDING

public static final byte TYPE_STRAIGHT_BENDING
A routing type representing a crossing of the partition cell with three segments, i.e., the item enters and exits the cell using the same direction but has an orthogonal middle segment between the entering and exiting segment.

See Also:
getType(), Constant Field Values

TYPE_BENDING

public static final byte TYPE_BENDING
A routing type representing a crossing of the partition cell with a single bend, i.e., the item enters the cell in one direction, makes a bend and exits the cell in an orthogonal direction.

See Also:
getType(), Constant Field Values

TYPE_U_TURN

public static final byte TYPE_U_TURN
A routing type representing a crossing of the partition cell by making a U-turn, i.e., the item enters and exits the cell on the same side using two turns and an orthogonal middle segment.

See Also:
getType(), Constant Field Values

TYPE_END

public static final byte TYPE_END
A routing type representing the source or target end of an item being in the cell, i.e., the enter and/or exit interval is null.

See Also:
getType(), Constant Field Values
Constructor Detail

EdgeCellInfo

public EdgeCellInfo(java.lang.Object item,
                    PartitionCell cell,
                    OrthogonalInterval enterInterval,
                    OrthogonalInterval exitInterval,
                    Direction enterDirection,
                    Direction exitDirection,
                    int enterSegmentNo)
Creates a new EdgeCellInfo instance.

Parameters:
item - the item whose routing in the cell is described
cell - the cell in which the item is routed
enterInterval - the interval that the item uses to enter the cell
exitInterval - the interval that the item uses to exit the cell
enterDirection - the direction in which the item enters the cell
exitDirection - the direction in which the item exits the cell
enterSegmentNo - the index of the item segment that enters the cell
Method Detail

getBendCount

public int getBendCount()
Returns the number of bends within this cell.

Returns:
the number of bends within this cell

toString

public java.lang.String toString()
Returns a string representation of the shape while crossing the partition cell.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the shape while crossing the partition cell

getType

public byte getType()
Returns the routing type within this cell.

Returns:
the routing type within this cell

getEnterSegmentNo

public int getEnterSegmentNo()
Returns the index of the segment that enters this cell.

Values should be non-negative.

Returns:
the index of the segment that enters this cell
See Also:
setEnterSegmentNo(int)

setEnterSegmentNo

public void setEnterSegmentNo(int segmentNo)
Specifies the index of the segment that enters this cell.

Values should be non-negative.

Default Value:
The default value is 0.
Parameters:
segmentNo - the index of the segment that enters this cell
Throws:
java.lang.IllegalArgumentException - if the given index is negative

getExitSegmentNo

public int getExitSegmentNo()
Returns the index of the segment that exits this cell.

Values should be non-negative.

Returns:
the index of the segment that exits this cell
See Also:
setExitSegmentNo(int)

setExitSegmentNo

public void setExitSegmentNo(int segmentNo)
Specifies the index of the segment that exits this cell.

Values should be non-negative.

Default Value:
The default value is 0.
Parameters:
segmentNo - the index of the segment that exits this cell
Throws:
java.lang.IllegalArgumentException - if the given index is negative

getEnterSegmentGroup

public SegmentGroup getEnterSegmentGroup()
Returns the segment group containing the entering segment.

When specifying the segment group, the enter interval is updated to use the segment group's common enter interval.

Returns:
the segment group containing the entering segment or null if the entering segment does not belong to a segment group
See Also:
SegmentGroup.getCommonLocationRange(), setEnterSegmentGroup(SegmentGroup)

setEnterSegmentGroup

public void setEnterSegmentGroup(SegmentGroup enterSegmentGroup)
Specifies the segment group containing the entering segment.

When specifying the segment group, the enter interval is updated to use the segment group's common enter interval.

Default Value:
The default value is null. The entering segment does not belong to any segment group.
Parameters:
enterSegmentGroup - the segment group containing the entering segment
See Also:
SegmentGroup.getCommonLocationRange()

getExitSegmentGroup

public SegmentGroup getExitSegmentGroup()
Returns the segment group containing the exiting segment.

When specifying the segment group, the exit interval is updated to use the segment group's common exit interval.

Returns:
the segment group containing the exiting segment or null if the exiting segment does not belong to a segment group
See Also:
SegmentGroup.getCommonLocationRange(), setExitSegmentGroup(SegmentGroup)

setExitSegmentGroup

public void setExitSegmentGroup(SegmentGroup exitSegmentGroup)
Specifies the segment group containing the exiting segment.

When specifying the segment group, the exit interval is updated to use the segment group's common exit interval.

Default Value:
The default value is null. The exiting segment does not belong to any segment group.
Parameters:
exitSegmentGroup - the segment group containing the exiting segment
See Also:
SegmentGroup.getCommonLocationRange()

getItem

public java.lang.Object getItem()
Returns the item that is routed within the partition cell.

The item is either of type PathRequest or Edge.

Returns:
the item that is routed within the partition cell

getCell

public PartitionCell getCell()
Returns the partition cell within which the item is routed.

Returns:
the partition cell within which the item is routed

getEnterInterval

public OrthogonalInterval getEnterInterval()
Returns the interval that is used to enter this cell.

Returns:
the interval that is used to enter this partition cell

getExitInterval

public OrthogonalInterval getExitInterval()
Returns the interval that is used to exit this cell.

Returns:
the interval that is used to exit this partition cell

getEnterDirection

public Direction getEnterDirection()
Returns the direction in which this cell is entered.

Returns:
the direction in which this cell is entered

getExitDirection

public Direction getExitDirection()
Returns the direction in which this cell is exited.

Returns:
the direction in which this cell is exited

getCellSegmentInfos

public YList getCellSegmentInfos()
Calculates the list of CellSegmentInfos for the segment parts that lie within the associated partition cell.

Returns:
a list of CellSegmentInfos for the segment parts that lie within the associated partition cell.

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