Interface TableCellRenderer

All Known Implementing Classes:
DefaultTableCellRenderer

public interface TableCellRenderer
Port of TableCellRenderer. Returns Component so the renderer hands back our emulator's Component hierarchy — JDK's java.awt.Component return type is incompatible with our hierarchy and is the central reason this interface is ported wholesale rather than reused (D_event_port_policy + the cell-renderer carve-out). Mirrors the ListCellRenderer stance for the same reason.

The table parameter is typed JTable and arrives differently from the two bridges (see @param table). A renderer that doesn't read the table (the common-case DefaultTableCellRenderer pattern: just format the value) works unchanged; one reading table.getSelectionForeground() or similar NPEs in the pure-surrogate path where table is null.

  • Method Summary

    Modifier and Type
    Method
    Description
    getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
    Build the rendering component for value.
  • Method Details

    • getTableCellRendererComponent

      Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
      Build the rendering component for value.
      Parameters:
      table - the rendering host — emulator JTable in emulator-flow, null from pure-surrogate contexts.
      value - the cell value to render. null is valid.
      isSelected - true if the cell is to be rendered with the selection highlighted.
      hasFocus - true if the cell has keyboard focus. Vaadin Grid has no per-cell focus signal at render time; the SJTable bridge always passes false (R_vaadin_first sub-bucket (c)).
      row - the row index of the cell being drawn. When drawing a column header, the value is -1.
      column - the column index of the cell being drawn.