Class RMShapeTable


  • public class RMShapeTable
    extends java.lang.Object
    Defines a region of coordinates along with a list of shapes that occupy that region.
    • Constructor Detail

      • RMShapeTable

        public RMShapeTable​(java.util.List<RMShape> theShapes)
        Creates a table from a list of shapes.
    • Method Detail

      • getShapes

        public java.util.List<RMShape> getShapes()
        Returns the list of table shapes.
      • getRowCount

        public int getRowCount()
        Returns the number of rows.
      • getRow

        public RMShapeTable.Row getRow​(int anIndex)
        Returns the individual row at given index.
      • getRows

        public java.util.List<RMShapeTable.Row> getRows()
        Returns a list of rows.
      • getColumn

        public RMShapeTable.Column getColumn​(int anIndex)
        Returns the individual column at given index.
      • getColumnCount

        public int getColumnCount()
        Returns the number of columns.
      • getColumns

        public java.util.List<RMShapeTable.Column> getColumns()
        Returns a list of columns.
      • getRowDividers

        public java.util.List<java.lang.Double> getRowDividers()
        Returns the list of row dividers.
      • getColumnDividers

        public java.util.List<java.lang.Double> getColumnDividers()
        Returns the list of column dividers.
      • getCellCount

        public int getCellCount()
        Returns the number of cells.
      • getCell

        public RMShapeTable.Cell getCell​(int anIndex)
        Returns the individual cell at the given index.
      • getCell

        public RMShapeTable.Cell getCell​(int aRow,
                                         int aColumn)
        Returns the individual cell at the given row and column.
      • getShapes

        public java.util.List<RMShape> getShapes​(int aRow,
                                                 int aColumn,
                                                 int aRowMax,
                                                 int aColumnMax)
        Returns the list of shapes from given rows and columns.
      • isEmpty

        public boolean isEmpty​(int aRow,
                               int aColumn,
                               int aRowMax,
                               int aColumnMax)
        Returns whether given range of cells is empty.
      • contains

        public boolean contains​(int aRow,
                                int aColumn,
                                int aRowMax,
                                int aColumnMax,
                                RMShape aShape)
        Returns whether given range of cells contains given shape.
      • addDouble

        public void addDouble​(java.util.List<java.lang.Double> aDoubleList,
                              java.lang.Double aDouble)
        Adds a double to a list.
      • equals

        public boolean equals​(double aValue1,
                              double aValue2)
        Returns whether double values are equal to the precision of the table.