Class RMCellTable

  • All Implemented Interfaces:
    RMArchiver.Archiving, java.lang.Cloneable

    public class RMCellTable
    extends RMShape
    Manages a table of RMCells, which is really a stack of RMCellRows.
    • Constructor Detail

      • RMCellTable

        public RMCellTable()
        Creates a new cell table.
    • Method Detail

      • getRowCount

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

        public RMCellRow getRow​(int anIndex)
        Returns the specific row at the given index.
      • getColumnCount

        public int getColumnCount()
        Returns the number of rows for this table.
      • getColumn

        public RMCellColumn getColumn​(int anIndex)
        Returns the specific column at the given index.
      • getCell

        public RMCell getCell​(int aRow,
                              int aColumn)
        Returns the cell at the given row and column indexes.
      • getRow

        public int getRow​(double aY)
        Returns the specific row index for the given point.
      • getColumn

        public int getColumn​(double anX)
        Returns the specific column index for the given point.
      • getCellRect

        public java.awt.Rectangle getCellRect​(java.awt.geom.Rectangle2D aRect)
        Returns the cell rect for the given rectangle2d.
      • addRow

        public void addRow​(int anIndex,
                           int refRow)
        Adds a row at the given index.
      • removeRow

        public void removeRow​(int anIndex)
        Removes the row at the given index.
      • addColumn

        public void addColumn​(int anIndex,
                              int refColumn)
        Adds a column at the given index.
      • removeColumn

        public void removeColumn​(int anIndex)
        Removes the column at the given index.
      • setRowCount

        public void setRowCount​(int aRowCount)
        Sets the number of rows.
      • setColumnCount

        public void setColumnCount​(int aColumnCount)
        Sets the number of columns for this table.
      • getHasHeaderRow

        public boolean getHasHeaderRow()
        Returns whether table has header row.
      • setHasHeaderRow

        public void setHasHeaderRow​(boolean aFlag)
        Sets whether table has header row.
      • getHasHeaderColumn

        public boolean getHasHeaderColumn()
        Returns whether table has header column.
      • setHasHeaderColumn

        public void setHasHeaderColumn​(boolean aFlag)
        Sets whether table has header column.
      • addColumnDivider

        public void addColumnDivider​(double anX)
        Adds a column divider at the given x coordinate.
      • addRowDivider

        public void addRowDivider​(double aY)
        Adds a row divider at the given y coordinate.
      • splitCellIntoColumns

        public void splitCellIntoColumns​(RMCell aCell)
        Splits a cell into 2 columns through it's mid point.
      • splitCellIntoRows

        public void splitCellIntoRows​(RMCell aCell)
        Splits a cell into 2 rows through it's mid point.
      • mergeCells

        public void mergeCells​(int aRow1,
                               int aCol1,
                               int aRow2,
                               int aCol2)
        Merges a range of cells into one cell.
      • setWidth

        public void setWidth​(double aValue)
        Overrides shape method to revalidate.
        Overrides:
        setWidth in class RMShape
      • setHeight

        public void setHeight​(double aValue)
        Overrides shape method to validate.
        Overrides:
        setHeight in class RMShape
      • validate

        public void validate()
        Relays out table rows, columns and cells.
      • superSelectable

        public boolean superSelectable()
        Editor method.
        Overrides:
        superSelectable in class RMShape