Class AiModelTableModel

java.lang.Object
javax.swing.table.AbstractTableModel
uno.anahata.asi.swing.provider.AiModelTableModel
All Implemented Interfaces:
Serializable, TableModel

public class AiModelTableModel extends AbstractTableModel
A specialized TableModel for rendering the technical specification and capabilities of AI models.

This model translates AbstractModel entities into a tabular format, exposing critical parameters like token limits, supported actions, and sampling defaults (temperature, Top-P, etc.).

Author:
anahata
See Also:
  • Field Details

    • columnNames

      private final String[] columnNames
      The ordered set of column headers reflecting model specifications.
    • models

      private final List<AbstractModel> models
      The backing list of model entities.
  • Constructor Details

    • AiModelTableModel

      public AiModelTableModel(List<AbstractModel> models)
      Constructs a new ModelTableModel.
      Parameters:
      models - The list of models to display.
  • Method Details

    • getModelAt

      public AbstractModel getModelAt(int rowIndex)
      Gets the model at the specified row index.
      Parameters:
      rowIndex - The row index.
      Returns:
      The AbstractModel, or null if the index is out of bounds.
    • getRowCount

      public int getRowCount()

      Returns the total number of registered models in the registry.

    • getColumnCount

      public int getColumnCount()

      Returns the number of technical parameters exposed by the model.

    • getColumnName

      public String getColumnName(int column)

      Provides the descriptive header for the technical parameter column.

      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
    • getValueAt

      public Object getValueAt(int rowIndex, int columnIndex)

      Extracts and formats specific technical attributes from the AbstractModel entity based on the column index.