Class NumberCellRenderer

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants, TableCellRenderer

A table cell renderer that formats numbers with right alignment in each cell.
See Also:
  • Constructor Details

    • NumberCellRenderer

      Default constructor - builds a renderer that right justifies the contents of a table cell.
  • Method Details

    • getTableCellRendererComponent

      public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
      Returns itself as the renderer. Supports the TableCellRenderer interface.
      Specified by:
      getTableCellRendererComponent in interface TableCellRenderer
      Overrides:
      getTableCellRendererComponent in class DefaultTableCellRenderer
      Parameters:
      table - the table.
      value - the data to be rendered.
      isSelected - a boolean that indicates whether or not the cell is selected.
      hasFocus - a boolean that indicates whether or not the cell has the focus.
      row - the (zero-based) row index.
      column - the (zero-based) column index.
      Returns:
      the component that can render the contents of the cell.