Class JXTable.TableAdapter

java.lang.Object
org.jdesktop.swingx.decorator.ComponentAdapter
org.jdesktop.swingx.JXTable.TableAdapter
Enclosing class:
JXTable

protected static class JXTable.TableAdapter extends org.jdesktop.swingx.decorator.ComponentAdapter
Author:
Ramesh Gupta, Amy Fowler, Mark Davidson, Jeanette Winzenburg
  • Field Details

    • table

      private final JXTable table
  • Constructor Details

    • TableAdapter

      public TableAdapter(JXTable component)
      Constructs a TableDataAdapter for the specified target component.
      Parameters:
      component - the target component
  • Method Details

    • getTable

      public JXTable getTable()
      Typesafe accessor for the target component.
      Returns:
      the target component as a JTable
    • getColumnName

      public String getColumnName(int columnIndex)
      Overrides:
      getColumnName in class org.jdesktop.swingx.decorator.ComponentAdapter
    • getColumnByModelIndex

      protected TableColumn getColumnByModelIndex(int modelColumn)
      Returns the first contained TableColumn with the given model index, or null if none is found.
      Parameters:
      modelColumn - the column index in model coordinates, must be valid
      Returns:
      the first contained TableColumn with the given model index, or null if none is found
      Throws:
      IllegalArgumentException - if model index invalid
    • getColumnIdentifierAt

      public Object getColumnIdentifierAt(int columnIndex)
      Overrides:
      getColumnIdentifierAt in class org.jdesktop.swingx.decorator.ComponentAdapter
    • getColumnIndex

      public int getColumnIndex(Object identifier)
      Overrides:
      getColumnIndex in class org.jdesktop.swingx.decorator.ComponentAdapter
    • getColumnClass

      public Class<?> getColumnClass(int column)
      Overrides:
      getColumnClass in class org.jdesktop.swingx.decorator.ComponentAdapter
    • getColumnCount

      public int getColumnCount()
      Overrides:
      getColumnCount in class org.jdesktop.swingx.decorator.ComponentAdapter
    • getRowCount

      public int getRowCount()
      Overrides:
      getRowCount in class org.jdesktop.swingx.decorator.ComponentAdapter
    • getValueAt

      public Object getValueAt(int row, int column)
      Specified by:
      getValueAt in class org.jdesktop.swingx.decorator.ComponentAdapter
    • isCellEditable

      public boolean isCellEditable(int row, int column)
      Specified by:
      isCellEditable in class org.jdesktop.swingx.decorator.ComponentAdapter
    • isTestable

      public boolean isTestable(int column)
      Overrides:
      isTestable in class org.jdesktop.swingx.decorator.ComponentAdapter
    • getStringAt

      public String getStringAt(int row, int column)
      This is implemented to query the table's StringValueRegistry for an appropriate StringValue and use that for getting the string representation.
      Overrides:
      getStringAt in class org.jdesktop.swingx.decorator.ComponentAdapter
    • getCellBounds

      public Rectangle getCellBounds()
      Overrides:
      getCellBounds in class org.jdesktop.swingx.decorator.ComponentAdapter
    • isEditable

      public boolean isEditable()
      Specified by:
      isEditable in class org.jdesktop.swingx.decorator.ComponentAdapter
    • isSelected

      public boolean isSelected()
      Specified by:
      isSelected in class org.jdesktop.swingx.decorator.ComponentAdapter
    • hasFocus

      public boolean hasFocus()
      Specified by:
      hasFocus in class org.jdesktop.swingx.decorator.ComponentAdapter
    • convertColumnIndexToView

      public int convertColumnIndexToView(int columnIndex)
      Overrides:
      convertColumnIndexToView in class org.jdesktop.swingx.decorator.ComponentAdapter
    • convertColumnIndexToModel

      public int convertColumnIndexToModel(int columnIndex)
      Overrides:
      convertColumnIndexToModel in class org.jdesktop.swingx.decorator.ComponentAdapter
    • convertRowIndexToView

      public int convertRowIndexToView(int rowModelIndex)
      Overrides:
      convertRowIndexToView in class org.jdesktop.swingx.decorator.ComponentAdapter
    • convertRowIndexToModel

      public int convertRowIndexToModel(int rowViewIndex)
      Overrides:
      convertRowIndexToModel in class org.jdesktop.swingx.decorator.ComponentAdapter