Search this API

y.layout.router.polyline
Class EdgeCellInfo

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

public class EdgeCellInfo
extends Object

Encapsulates the information that determines the route of a specific edge within a specific partition cell.


Field Summary
static byte TYPE_BENDING
          Routing type information representing a crossing of the cell with a single bend, i.e. the edge enters the cell in one direction, makes a bend and exits the cell in an orthogonal direction.
static byte TYPE_END
          Routing type information representing the source or target end of an edge being in the cell, i.e. the enter and/or exit interval is null.
static byte TYPE_STRAIGHT
          Routing type information representing a straight crossing of the cell, i.e. a single orthogonal segment of edge enters and exits the cell.
static byte TYPE_STRAIGHT_BENDING
          Routing type information representing a crossing of the cell with three segments, i.e. the edge 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
          Routing type information representing a crossing of the cell by making a u-turn, i.e. the edge enters and exits the cell on the same side using two turns and an orthogonal middle segment.
 
Constructor Summary
EdgeCellInfo(Edge edge, PartitionCell cell, OrthogonalInterval enterInterval, OrthogonalInterval exitInterval, Direction enterDirection, Direction exitDirection, int enterSegmentNo)
          Creates a new instance.
 
Method Summary
 int getBendCount()
          Returns the number of bends the edge has inside this cell.
 PartitionCell getCell()
          Returns the cell the edge is routed in.
 YList getCellSegmentInfos()
          Gets the CellSegmentInfos for the the segment parts of this edge that run inside this cell.
 Edge getEdge()
          Returns the edge whose routing in the cell is described.
 Direction getEnterDirection()
          Returns the direction, this edge uses to enter this cell.
 OrthogonalInterval getEnterInterval()
          Returns the interval, the edge uses to enter this cell.
 SegmentGroup getEnterSegmentGroup()
          Returns the segment group containing the entering segment.
 int getEnterSegmentNo()
          Returns the index of the edge segment that enters this cell.
 Direction getExitDirection()
          Returns the direction, this edge uses to exit this cell.
 OrthogonalInterval getExitInterval()
          Returns the interval, the edge uses to exit this cell.
 SegmentGroup getExitSegmentGroup()
          Returns the segment group containing the exiting segment.
 int getExitSegmentNo()
          Returns the index of the edge segment that exits this cell.
 byte getType()
          Returns the routing type the edge uses in this cell.
 void setEnterSegmentGroup(SegmentGroup enterSegmentGroup)
          Sets the segment group containing the entering segment and updates the enter interval to use the segment groups common enter interval.
 void setEnterSegmentNo(int segmentNo)
          Sets the index of the edge segment that enters this cell.
 void setExitSegmentGroup(SegmentGroup exitSegmentGroup)
          Sets the segment group containing the exiting segment and updates the exit interval to use the segment groups common enter interval.
 void setExitSegmentNo(int segmentNo)
          Sets the index of the edge segment that exits this cell.
 String toString()
          Returns a String<\code> representation of the shape in which the edge crosses the PartitionCell.
 
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
Routing type information representing a straight crossing of the cell, i.e. a single orthogonal segment of edge enters and exits the cell.

See Also:
getType(), Constant Field Values

TYPE_STRAIGHT_BENDING

public static final byte TYPE_STRAIGHT_BENDING
Routing type information representing a crossing of the cell with three segments, i.e. the edge 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
Routing type information representing a crossing of the cell with a single bend, i.e. the edge 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
Routing type information representing a crossing of the cell by making a u-turn, i.e. the edge 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
Routing type information representing the source or target end of an edge 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(Edge edge,
                    PartitionCell cell,
                    OrthogonalInterval enterInterval,
                    OrthogonalInterval exitInterval,
                    Direction enterDirection,
                    Direction exitDirection,
                    int enterSegmentNo)
Creates a new instance.

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

getBendCount

public int getBendCount()
Returns the number of bends the edge has inside this cell.

Returns:
The number of bends the edge has inside this cell.

toString

public String toString()
Returns a String<\code> representation of the shape in which the edge crosses the PartitionCell.

Overrides:
toString in class Object
Returns:
A String<\code> representation of the shape in which the edge crosses the PartitionCell.

getType

public byte getType()
Returns the routing type the edge uses in this cell. This is one of:

Returns:
The routing type the edge uses in this cell.

getEnterSegmentNo

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

Returns:
The index of the edge segment that enters this cell.

setEnterSegmentNo

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

Parameters:
segmentNo - The index of the edge segment that enters this cell.

getExitSegmentNo

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

Returns:
The index of the edge segment that exits this cell.

setExitSegmentNo

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

Parameters:
segmentNo - The index of the edge segment that exits this cell.

getEnterSegmentGroup

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

Returns:
The segment group containing the entering segment or null if the entering segment is in no segment group.

setEnterSegmentGroup

public void setEnterSegmentGroup(SegmentGroup enterSegmentGroup)
Sets the segment group containing the entering segment and updates the enter interval to use the segment groups common enter interval.

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.

Returns:
The segment group containing the exiting segment or null if the exiting segment is in no segment group.

setExitSegmentGroup

public void setExitSegmentGroup(SegmentGroup exitSegmentGroup)
Sets the segment group containing the exiting segment and updates the exit interval to use the segment groups common enter interval.

Parameters:
exitSegmentGroup - The segment group containing the exiting segment.
See Also:
SegmentGroup.getCommonLocationRange()

getEdge

public Edge getEdge()
Returns the edge whose routing in the cell is described.

Returns:
The edge whose routing in the cell is described.

getCell

public PartitionCell getCell()
Returns the cell the edge is routed in.

Returns:
The cell the edge is routed in.

getEnterInterval

public OrthogonalInterval getEnterInterval()
Returns the interval, the edge uses to enter this cell.

Returns:
The interval, the edge uses to enter this cell.

getExitInterval

public OrthogonalInterval getExitInterval()
Returns the interval, the edge uses to exit this cell.

Returns:
The interval, the edge uses to exit this cell.

getEnterDirection

public Direction getEnterDirection()
Returns the direction, this edge uses to enter this cell.

Returns:
The direction, this edge uses to enter this cell.

getExitDirection

public Direction getExitDirection()
Returns the direction, this edge uses to exit this cell.

Returns:
The direction, this edge uses to enter this cell.

getCellSegmentInfos

public YList getCellSegmentInfos()
Gets the CellSegmentInfos for the the segment parts of this edge that run inside this cell.

Returns:
A list of CellSegmentInfo object created for the edge and this cell

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