Class VoronoiOutputRaster


  • public class VoronoiOutputRaster
    extends java.lang.Object
    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 
      Constructor Description
      VoronoiOutputRaster()
      Creates a new Voronoi output object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      VoronoiCell get​(int x, int y)
      Gets the cell stored at the specified coordinate location
      VoronoiCell get​(Point2i position)
      Gets the cell stored at the specified coordinate location
      VoronoiCell[][] getCellRaster()
      For debug only.
      void getCellRasterSize​(java.awt.Dimension size)  
      java.awt.Rectangle getDomainBounds()
      Gets the domain bounds of the Voronoi data
      int getHeight()  
      int getWidth()  
      void set​(int x, int y, VoronoiCell cell)
      Stores the cell at the specified coordinate location
      void setDomain​(java.awt.Shape shape)
      Sets the bounds of the Voronoi layout.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VoronoiOutputRaster

        public VoronoiOutputRaster()
        Creates a new Voronoi output object.
    • Method Detail

      • setDomain

        public void setDomain​(java.awt.Shape shape)
        Sets the bounds of the Voronoi layout.
        Parameters:
        shape - bounds of the Voronoi layout
      • getCellRasterSize

        public void getCellRasterSize​(java.awt.Dimension size)
      • getWidth

        public int getWidth()
      • getHeight

        public int getHeight()
      • set

        public void set​(int x,
                        int y,
                        VoronoiCell cell)
        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

        public VoronoiCell get​(int x,
                               int y)
        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

        public VoronoiCell get​(Point2i position)
        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

        public java.awt.Rectangle getDomainBounds()
        Gets the domain bounds of the Voronoi data
        Returns:
        The domain bounds
      • getCellRaster

        public VoronoiCell[][] getCellRaster()
        For debug only.
        Returns: