Class SpreadSheetCellSelector.CellRenderer

    • Field Detail

      • m_CellSelectedColor

        protected Color m_CellSelectedColor
        the color for selected cells.
    • Constructor Detail

      • CellRenderer

        public CellRenderer​(Color cellSelectedColor)
        Initializes the renderer.
        Parameters:
        cellSelectedColor - the color for selected cells
    • Method Detail

      • getCellSelectedColor

        public Color getCellSelectedColor()
        Returns the color in use for selected cells.
        Returns:
        the color
      • getTableCellRendererComponent

        public Component getTableCellRendererComponent​(JTable table,
                                                       Object value,
                                                       boolean isSelected,
                                                       boolean hasFocus,
                                                       int row,
                                                       int column)
        Returns the default table cell renderer.
        Specified by:
        getTableCellRendererComponent in interface TableCellRenderer
        Overrides:
        getTableCellRendererComponent in class DefaultTableCellRenderer
        Parameters:
        table - the table this object belongs to
        value - the actual cell value
        isSelected - whether the cell is selected
        hasFocus - whether the cell has the focus
        row - the row in the table
        column - the column in the table
        Returns:
        the rendering component