Class SpreadSheetCellSelector.Table

    • Field Detail

      • m_Selecting

        protected boolean m_Selecting
        whether selecting or unselecting.
      • m_Recording

        protected boolean m_Recording
        whether left mouse button has been pressed.
    • Constructor Detail

      • Table

        public Table​(SpreadSheet sheet)
        Initializes the table.
        Parameters:
        sheet - the spreadsheet to use
    • Method Detail

      • initGUI

        protected void initGUI()
        Initializes some GUI-related things.
        Overrides:
        initGUI in class SpreadSheetTable
      • check

        protected void check​(MouseEvent e)
        Checks a mouse event, whether to select/unselect a cell.
        Parameters:
        e - the event
      • check

        protected void check()
        Selects the current cell if recording is on.
      • setModel

        public void setModel​(TableModel model)
        Sets the model to display.
        Overrides:
        setModel in class SpreadSheetTable
        Parameters:
        model - the model to display
      • setSelected

        public boolean setSelected​(int row,
                                   int col,
                                   boolean selected)
        Sets the selection state of a cell.
        Parameters:
        row - the row of the cell
        col - the column of the cell
        selected - whether selected or not
        Returns:
        if the value got changed
      • isSelected

        public boolean isSelected​(int row,
                                  int col)
        Returns whether a cell is selected or not.
        Parameters:
        row - the row of the cell
        col - the column of the cell
        Returns:
        true if selected