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, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()booleanIndicates whether some other object is "equal to" this one.final ClassgetClass()Returns the runtime class of an object.inthashCode()Returns a hash code value for the object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.toString()Returns a string representation of the object.final voidwait()Causes current thread to wait until another thread invokes the method or the method for this object.final voidwait(long timeout) Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.final voidwait(long timeout, int nanos) Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.Methods inherited from interface TableModel
addDataChangeListener, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeDataChangeListener, setValueAtModifier and TypeMethodDescriptionvoidAdds a listener to the data changed eventintReturns the number of columns in the tablegetColumnName(int i) Returns the name of the column at the given offsetintReturns the number of rows in the tablegetValueAt(int row, int column) Returns the value of the cell at the given locationbooleanisCellEditable(int row, int column) Returns true if the cell at the given location is an editable cellvoidRemoves a listener to the data changed eventvoidsetValueAt(int row, int column, Object o) Sets the value of the cell at the given location
-
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
-