public class ReadonlyTableModel
extends javax.swing.table.DefaultTableModel
Constructor and Description |
---|
ReadonlyTableModel()
Constructs a default
DefaultTableModel
which is a table of zero columns and zero rows. |
ReadonlyTableModel(int rowCount,
int columnCount)
Constructs a
DefaultTableModel with
rowCount and columnCount of
null object values. |
ReadonlyTableModel(java.lang.Object[][] data,
java.lang.Object[] columnNames)
Constructs a
DefaultTableModel and initializes the table
by passing data and columnNames
to the setDataVector
method. |
ReadonlyTableModel(java.lang.Object[] columnNames,
int rowCount)
Constructs a
DefaultTableModel with as many
columns as there are elements in columnNames
and rowCount of null
object values. |
ReadonlyTableModel(java.util.Vector columnNames,
int rowCount)
Constructs a
DefaultTableModel with as many columns
as there are elements in columnNames
and rowCount of null
object values. |
ReadonlyTableModel(java.util.Vector data,
java.util.Vector columnNames)
Constructs a
DefaultTableModel and initializes the table
by passing data and columnNames
to the setDataVector method. |
Modifier and Type | Method and Description |
---|---|
boolean |
isCellEditable(int row,
int column) |
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, getRowCount, getValueAt, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
public ReadonlyTableModel()
DefaultTableModel
which is a table of zero columns and zero rows.public ReadonlyTableModel(int rowCount, int columnCount)
DefaultTableModel
with
rowCount
and columnCount
of
null
object values.rowCount
- the number of rows the table holdscolumnCount
- the number of columns the table holdsDefaultTableModel.setValueAt(java.lang.Object, int, int)
public ReadonlyTableModel(java.util.Vector columnNames, int rowCount)
DefaultTableModel
with as many columns
as there are elements in columnNames
and rowCount
of null
object values. Each column's name will be taken from
the columnNames
vector.columnNames
- vector
containing the names
of the new columns; if this is
null
then the model has no columnsrowCount
- the number of rows the table holdsDefaultTableModel.setDataVector(java.util.Vector, java.util.Vector)
,
DefaultTableModel.setValueAt(java.lang.Object, int, int)
public ReadonlyTableModel(java.lang.Object[] columnNames, int rowCount)
DefaultTableModel
with as many
columns as there are elements in columnNames
and rowCount
of null
object values. Each column's name will be taken from
the columnNames
array.columnNames
- array
containing the names
of the new columns; if this is
null
then the model has no columnsrowCount
- the number of rows the table holdsDefaultTableModel.setDataVector(java.util.Vector, java.util.Vector)
,
DefaultTableModel.setValueAt(java.lang.Object, int, int)
public ReadonlyTableModel(java.util.Vector data, java.util.Vector columnNames)
DefaultTableModel
and initializes the table
by passing data
and columnNames
to the setDataVector
method.data
- the data of the table, a Vector
of Vector
s of Object
valuescolumnNames
- vector
containing the names
of the new columnsDefaultTableModel.getDataVector()
,
DefaultTableModel.setDataVector(java.util.Vector, java.util.Vector)
public ReadonlyTableModel(java.lang.Object[][] data, java.lang.Object[] columnNames)
DefaultTableModel
and initializes the table
by passing data
and columnNames
to the setDataVector
method. The first index in the Object[][]
array is
the row index and the second is the column index.data
- the data of the tablecolumnNames
- the names of the columnsDefaultTableModel.getDataVector()
,
DefaultTableModel.setDataVector(java.util.Vector, java.util.Vector)