Class AbstractTableModel
java.lang.Object
com.codename1.ui.table.AbstractTableModel
- All Implemented Interfaces:
TableModel
- Direct Known Subclasses:
DefaultTableModel, SortableTableModel, UiBinding.BoundTableModel
This abstract class extends table model with various capabilities such
as type information etc.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCellType(int row, int column) Allows the table to hint the class type of a specific cellString[]getMultipleChoiceOptions(int row, int column) Allows the table cell to feature multiple choice for a specific entrygetValidationConstraint(int row, int column) If the cell has a validation constraint it's returned hereA validator can be defined here so a validation constraint can bind to a table model cellvoidsetValidator(Validator validator) A validator can be defined here so a validation constraint can bind to a table model cellMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TableModel
addDataChangeListener, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeDataChangeListener, setValueAt
-
Constructor Details
-
AbstractTableModel
public AbstractTableModel()
-
-
Method Details
-
getCellType
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
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
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
A validator can be defined here so a validation constraint can bind to a table model cell
Returns
the validator
-
setValidator
A validator can be defined here so a validation constraint can bind to a table model cell
Parameters
validator: the validator to set
-