Class RowHeader

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, Scrollable

public class RowHeader extends JTable
A single-column JTable impersonating a table's row headers and listening to clicks for column selection
See Also:
  • Field Details

    • listenerInstalled

      protected boolean listenerInstalled
  • Constructor Details

    • RowHeader

      public RowHeader()
      make a RowHeader with default model (displaying row numbers)
    • RowHeader

      public RowHeader(TableModel dm)
      make a RowHeader with the specified model.
      If the supplied model does not implement ModelHandlesRowHeader the RowHeader will ignore it and use its default model showing row numbers.
      If the model implements PrototypedTableModel The RowHeader will try to automatically determine its width, otherwise a default width will be used.
      See Also:
  • Method Details

    • createDefaultColumnsFromModel

      public void createDefaultColumnsFromModel()
      Overrides:
      createDefaultColumnsFromModel in class JTable
    • getCellRenderer

      public TableCellRenderer getCellRenderer(int row, int column)
      Overrides:
      getCellRenderer in class JTable
    • updateStructure

      public void updateStructure()
    • update

      public void update()
    • updateRows

      public void updateRows(int firstRow, int lastRow)
    • install

      public void install(JTable table, JScrollPane jsp)
    • uninstall

      public void uninstall()
    • setAllowsClickRowSelection

      public void setAllowsClickRowSelection(boolean b)
    • setWidth

      public void setWidth(int width)
    • getWidth

      public int getWidth()
      Overrides:
      getWidth in class JComponent
    • prepareRenderer

      public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
      Overrides:
      prepareRenderer in class JTable
    • isCellEditable

      public boolean isCellEditable(int row, int col)
      Overrides:
      isCellEditable in class JTable