Package com.treemap.swing.voronoi
Class VoronoiOutputRaster
java.lang.Object
com.treemap.swing.voronoi.VoronoiOutputRaster
The raster Output of a Voronoi treemap layout. The raster is a two dimensional array where each raster element can
have a Voronoi cell assigned.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget
(int x, int y) Gets the cell stored at the specified coordinate locationGets the cell stored at the specified coordinate locationVoronoiCell[][]
For debug only.void
getCellRasterSize
(Dimension size) Gets the domain bounds of the Voronoi dataint
int
getWidth()
void
set
(int x, int y, VoronoiCell cell) Stores the cell at the specified coordinate locationvoid
setDomain
(com.macrofocus.geom.Shape shape) Sets the bounds of the Voronoi layout.
-
Constructor Details
-
VoronoiOutputRaster
public VoronoiOutputRaster()Creates a new Voronoi output object.
-
-
Method Details
-
setDomain
public void setDomain(com.macrofocus.geom.Shape shape) Sets the bounds of the Voronoi layout.- Parameters:
shape
- bounds of the Voronoi layout
-
getCellRasterSize
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
set
Stores the cell at the specified coordinate location- Parameters:
x
- X-coordinate in diagram coordinates (so it has an offset if the output is a sub division of another cell and not located at x=0)y
- Y-coordinate in diagram coordinates (so it has an offset if the output is a sub division of another cell and not located at y=0)cell
- Cell to store at the specified coordinate location
-
get
Gets the cell stored at the specified coordinate location- Parameters:
x
- X-coordinate in diagram coordinates (so it has an offset if the output is a sub division of another cell and not located at x=0)y
- Y-coordinate in diagram coordinates (so it has an offset if the output is a sub division of another cell and not located at y=0)- Returns:
- The cell stored at the specified coordinate location
-
get
Gets the cell stored at the specified coordinate location- Parameters:
position
- X/Y-coordinates in diagram coordinates (so it has an offset if the output is a sub division of another cell and not located at (x=0, y=0) )- Returns:
- The cell stored at the specified coordinate location
-
getDomainBounds
Gets the domain bounds of the Voronoi data- Returns:
- The domain bounds
-
getCellRaster
For debug only.- Returns:
-