public class DefaultLayoutCell extends java.lang.Object implements LayoutCell, java.io.Serializable
LayoutCell.RectangleHandler, LayoutCell.SubcellHandler
MAX_COORD
Constructor and Description |
---|
DefaultLayoutCell(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addRectangle(int minX,
int minY,
int maxX,
int maxY) |
void |
addSubCell(LayoutCell subCell,
int anchorX,
int anchorY,
ManhattanOrientation orient) |
int |
getBoundingMaxX() |
int |
getBoundingMaxY() |
int |
getBoundingMinX() |
int |
getBoundingMinY() |
java.lang.String |
getName() |
int |
getNumRectangles() |
int |
getNumSubcells() |
void |
readRectangleCoords(int[] result,
int offset,
int count)
Read coordinates of part of rectangles into int array.
|
void |
setName(java.lang.String name) |
void |
traverseRectangles(LayoutCell.RectangleHandler h)
Traverse all rectangles by specified handler
|
void |
traverseRectangles(LayoutCell.RectangleHandler h,
int offset,
int count)
Traverse part of rectangles by specified handler
|
void |
traverseSubcellInstances(LayoutCell.SubcellHandler h)
Traverse all subcell instances by specified handler
|
void |
traverseSubcellInstances(LayoutCell.SubcellHandler h,
int offset,
int count)
Traverse part of subcell instances by specified handler
|
public java.lang.String getName()
getName
in interface LayoutCell
public int getNumRectangles()
getNumRectangles
in interface LayoutCell
public void traverseRectangles(LayoutCell.RectangleHandler h)
traverseRectangles
in interface LayoutCell
h
- handlerpublic void traverseRectangles(LayoutCell.RectangleHandler h, int offset, int count)
traverseRectangles
in interface LayoutCell
h
- handleroffset
- the first rectanglecount
- the number of rectanglepublic void readRectangleCoords(int[] result, int offset, int count)
readRectangleCoords
in interface LayoutCell
result
- offset
- The first rectanglecount
- The number of rectanglespublic int getNumSubcells()
getNumSubcells
in interface LayoutCell
public void traverseSubcellInstances(LayoutCell.SubcellHandler h)
traverseSubcellInstances
in interface LayoutCell
h
- handlerpublic void traverseSubcellInstances(LayoutCell.SubcellHandler h, int offset, int count)
traverseSubcellInstances
in interface LayoutCell
h
- handleroffset
- the first subcell instancecount
- the number of subcell instancespublic int getBoundingMinX()
getBoundingMinX
in interface LayoutCell
public int getBoundingMinY()
getBoundingMinY
in interface LayoutCell
public int getBoundingMaxX()
getBoundingMaxX
in interface LayoutCell
public int getBoundingMaxY()
getBoundingMaxY
in interface LayoutCell
public void setName(java.lang.String name)
public void addRectangle(int minX, int minY, int maxX, int maxY)
public void addSubCell(LayoutCell subCell, int anchorX, int anchorY, ManhattanOrientation orient)