Class AbstractTableModel

java.lang.Object
com.codename1.ui.table.AbstractTableModel
All Implemented Interfaces:
TableModel
Direct Known Subclasses:
DefaultTableModel, SortableTableModel, UiBinding.BoundTableModel

public abstract class AbstractTableModel extends Object implements TableModel
This abstract class extends table model with various capabilities such as type information etc.
  • Constructor Details

    • AbstractTableModel

      public AbstractTableModel()
  • Method Details

    • getCellType

      public Class getCellType(int row, int column)

      Allows the table to hint the class type of a specific cell

      Parameters
      • row: the row in the table

      • column: the column

      Returns

      the class representing this cell

    • getValidationConstraint

      public Constraint getValidationConstraint(int row, int column)

      If the cell has a validation constraint it's returned here

      Parameters
      • row: the row

      • column: the column for the cell

      Returns

      null for no constraints

    • getMultipleChoiceOptions

      public String[] getMultipleChoiceOptions(int row, int column)

      Allows the table cell to feature multiple choice for a specific entry

      Parameters
      • row: the row in the table

      • column: the column

      Returns
      Returns:
      the string values matching the entries or null if this isn't a multiple choice option
    • getValidator

      public Validator getValidator()

      A validator can be defined here so a validation constraint can bind to a table model cell

      Returns

      the validator

    • setValidator

      public void setValidator(Validator validator)

      A validator can be defined here so a validation constraint can bind to a table model cell

      Parameters
      • validator: the validator to set