Class ConfigGridDimen

All Implemented Interfaces:
Configuration, Serializable

public class ConfigGridDimen extends Object implements Configuration
Generic class that specifies the physical dimensions of a grid. Rows and columns count the number of shapes in a grid. If chessboard it's the number of squares, including the space between them.
See Also:
  • Field Details

    • numRows

      public int numRows
      Number of squares tall the grid is. Target dependent.
    • numCols

      public int numCols
      Number of squares wide the grid is. Target dependent.
    • shapeSize

      public double shapeSize
      Physical size of each shape. Side length for squares. Diameter for a circle.
    • shapeDistance

      public double shapeDistance
      Space between shapes. For squares this would be the distance between the sides. For circles is the distance between the circle's center. Not used for chessboard.
  • Constructor Details

    • ConfigGridDimen

      public ConfigGridDimen(int numRows, int numCols, double shapeSize)
    • ConfigGridDimen

      public ConfigGridDimen(int numRows, int numCols, double shapeSize, double shapeDistance)
    • ConfigGridDimen

      public ConfigGridDimen()
  • Method Details

    • setTo

      public ConfigGridDimen setTo(int numRows, int numCols, double shapeSize, double shapeDistance)
    • setTo

      public ConfigGridDimen setTo(ConfigGridDimen src)
    • getSpacetoSizeRatio

      public double getSpacetoSizeRatio()
    • checkValidity

      public void checkValidity()
      Description copied from interface: Configuration
      Checks to see if the configuration is valid. If it is invalid, throw an exception explaining what is incorrect.
      Specified by:
      checkValidity in interface Configuration
    • toString

      public String toString()
      toString in class Object