Uses of Interface
javax.swing.table.TableModel
Package
Description
Provides a set of "lightweight" (all-Java language) components
that, to the maximum degree possible, work the same on all platforms.
Provides for events fired by Swing components.
Provides classes and interfaces for dealing with
javax.swing.JTable
.-
Uses of TableModel in javax.swing
Modifier and TypeFieldDescriptionprotected TableModel
JTable.dataModel
TheTableModel
of the table.Modifier and TypeMethodDescriptionprotected TableModel
JTable.createDefaultDataModel()
Returns the default table model object, which is aDefaultTableModel
.JTable.getModel()
Returns theTableModel
that provides the data displayed by thisJTable
.Modifier and TypeMethodDescriptionRowSorter
<? extends TableModel> JTable.getRowSorter()
Returns the object responsible for sorting.Modifier and TypeMethodDescriptionvoid
JTable.setModel
(TableModel dataModel) Sets the data model for this table todataModel
and registers with it for listener notifications from the new data model.Modifier and TypeMethodDescriptionvoid
JTable.setRowSorter
(RowSorter<? extends TableModel> sorter) Sets theRowSorter
.ModifierConstructorDescriptionJTable
(TableModel dm) Constructs aJTable
that is initialized withdm
as the data model, a default column model, and a default selection model.JTable
(TableModel dm, TableColumnModel cm) Constructs aJTable
that is initialized withdm
as the data model,cm
as the column model, and a default selection model.JTable
(TableModel dm, TableColumnModel cm, ListSelectionModel sm) Constructs aJTable
that is initialized withdm
as the data model,cm
as the column model, andsm
as the selection model. -
Uses of TableModel in javax.swing.event
ModifierConstructorDescriptionTableModelEvent
(TableModel source) All row data in the table has changed, listeners should discard any state that was based on the rows and requery theTableModel
to get the new row count and all the appropriate values.TableModelEvent
(TableModel source, int row) This row of data has been updated.TableModelEvent
(TableModel source, int firstRow, int lastRow) The data in rows [firstRow, lastRow] have been updated.TableModelEvent
(TableModel source, int firstRow, int lastRow, int column) The cells in column column in the range [firstRow, lastRow] have been updated.TableModelEvent
(TableModel source, int firstRow, int lastRow, int column, int type) The cells from (firstRow, column) to (lastRow, column) have been changed. -
Uses of TableModel in javax.swing.table
Modifier and TypeClassDescriptionclass
TableRowSorter<M extends TableModel>
An implementation ofRowSorter
that provides sorting and filtering using aTableModel
.Modifier and TypeClassDescriptionclass
This abstract class provides default implementations for most of the methods in theTableModel
interface.class
This is an implementation ofTableModel
that uses aVector
ofVectors
to store the cell value objects.Modifier and TypeMethodDescriptionabstract String
TableStringConverter.toString
(TableModel model, int row, int column) Returns the string representation of the value at the specified location.