public class PartitionCell extends Object
PartitionCell represents a rectangular part of a IPartition as result of the decomposition process.
Each instance of PartitionCell can hold arbitrary additional information (e.g. what element of the graph is
covered by a PartitionCell) which can be provided using method putData(Object, Object). Accessing and
removing this information can be done using getData(Object) and removeData(Object), respectively.
PartitionCellKeys| Modifier and Type | Class and Description |
|---|---|
static class |
PartitionCell.PartitionCellBorder
This class is a type-safe enumeration used for defining the border of a
PartitionCell. |
| Constructor and Description |
|---|
PartitionCell(double x,
double y,
double width,
double height,
IPartition partition)
Creates a new
PartitionCell instance of the given IPartition with the given bounds. |
PartitionCell(YRectangle bounds,
IPartition partition)
Creates a new
PartitionCell of the given IPartition with the location and the size of the given
rectangle. |
| Modifier and Type | Method and Description |
|---|---|
void |
clearData()
Clears all additional data for this
PartitionCell. |
OrthogonalInterval |
createBorderInterval(PartitionCell.PartitionCellBorder border)
Returns an
OrthogonalInterval that defines the location, the size and the orientation of the given
PartitionCell.PartitionCellBorder. |
YRectangle |
getBounds()
Gets the bounds of this
PartitionCell. |
Object |
getData(Object key)
Returns the additional data associated with the given key for this
PartitionCell. |
double |
getHeight()
Gets the height of this
PartitionCell. |
int |
getId()
Gets a unique identifier of this
PartitionCell. |
double |
getMaxX()
Gets the x-coordinate of the right border of this
PartitionCell. |
double |
getMaxY()
Gets the y-coordinate of the bottom border of this
PartitionCell. |
double |
getMinX()
Gets the x-coordinate of the left border of this
PartitionCell. |
double |
getMinY()
Gets the y-coordinate of the upper border of this
PartitionCell. |
IPartition |
getPartition()
Gets the
partition to which this PartitionCell belongs. |
double |
getWidth()
Gets the width of this
PartitionCell. |
Object |
putData(Object key,
Object data)
Stores the additional data associated with the given key for this
PartitionCell. |
Object |
removeData(Object key)
Removes the additional data associated with the given key for this
PartitionCell. |
public PartitionCell(double x,
double y,
double width,
double height,
IPartition partition)
PartitionCell instance of the given IPartition with the given bounds.x - the x-coordinate of the upper-left corner of the partition celly - the y-coordinate of the upper-left corner of the partition cellwidth - the width of the partition cellheight - the height of the partition cellpartition - the partition to which the partition cell belongsIPartitionpublic PartitionCell(YRectangle bounds, IPartition partition)
PartitionCell of the given IPartition with the location and the size of the given
rectangle.bounds - the bounds describing the size and location of the partition cellpartition - the partition to which the partition cell belongsIPartitionpublic void clearData()
PartitionCell.getData(Object),
putData(Object, Object),
removeData(Object)public OrthogonalInterval createBorderInterval(PartitionCell.PartitionCellBorder border)
OrthogonalInterval that defines the location, the size and the orientation of the given
PartitionCell.PartitionCellBorder.
The values defining the border are:
border - a border of this partition cellOrthogonalInterval that defines the location, the size and the orientation of the given borderPartitionCell.PartitionCellBorderpublic YRectangle getBounds()
PartitionCell.public Object getData(Object key)
PartitionCell.key - the key whose associated data will be returnednull if there is no data associated with the given keyputData(Object, Object),
removeData(Object),
clearData(),
PartitionCellKeyspublic double getHeight()
PartitionCell.public int getId()
PartitionCell.public double getMaxX()
PartitionCell.public double getMaxY()
PartitionCell.public double getMinX()
PartitionCell.public double getMinY()
PartitionCell.public IPartition getPartition()
partition to which this PartitionCell belongs.IPartitionpublic double getWidth()
PartitionCell.public Object putData(Object key, Object data)
PartitionCell.key - the key with which the additional data will be associateddata - the additional datanull if there was no data associated with the given keygetData(Object),
removeData(Object),
clearData(),
PartitionCellKeyspublic Object removeData(Object key)
PartitionCell.key - the key for which the associated data will be removednull if there is no data associated with the given keygetData(Object),
putData(Object, Object),
clearData(),
PartitionCellKeys