Class PersistentQueryStatusColumnRenderer

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

public class PersistentQueryStatusColumnRenderer extends ColumnRenderer
See Also:
  • Constructor Details

    • PersistentQueryStatusColumnRenderer

      public PersistentQueryStatusColumnRenderer(GuiColumn column)
  • Method Details

    • getBackgroundColorForStatus

      public static Color getBackgroundColorForStatus(PersistentQueryState.Status status)
    • getHorizontalAlignment

      public int getHorizontalAlignment(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
      Description copied from class: ColumnRenderer
      Get the horizontal alignment for the cell. If specified by the GuiColumn it will use that value. otherwise it will Right align numbers, and left align everything else.
      Overrides:
      getHorizontalAlignment in class ColumnRenderer
      Parameters:
      table - The table being rendered.
      value - The value being rendered.
      isSelected - If the cell is selected.
      hasFocus - If the cell has focus.
      row - The current row number.
      column - The current column index.
      Returns:
      The cell's horizontal alignment.
    • getBackground

      public Color getBackground(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
      Description copied from class: ColumnRenderer
      Get the background color for the current cell. If the GuiColumn specified a background and the row is not selected it will use the GuiColumn's color. Otherwise it will use the colors specified by the UIDefaults. If the model indicates that the cell is stale, it will wash the color.
      Overrides:
      getBackground in class ColumnRenderer
      Parameters:
      table - The table being rendered.
      value - The value to render.
      isSelected - If this cell is selected.
      hasFocus - If this cell has focus.
      row - The current row number.
      column - The current column index.
      Returns:
      A Color to use for this cell's background.
      See Also:
    • getForeground

      public Color getForeground(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
      Description copied from class: ColumnRenderer
      Get the foreground color for the current cell. If the GuiColumn specified a foreground use that, unless the value is null. If the model indicates that the cell is stale it will wash the color.
      Overrides:
      getForeground in class ColumnRenderer
      Parameters:
      table - The table being rendered.
      value - The value being rendered.
      isSelected - If the cell is selected.
      hasFocus - If the cell has focus.
      row - The current row number.
      column - The current column index.
      Returns:
      A Color to use for this cell's foreground.
      See Also: