public class EnhancedDefaultTableModel
extends javax.swing.table.DefaultTableModel
Constructor and Description |
---|
EnhancedDefaultTableModel()
Constructs a default
EnhancedDefaultTableModel
which is a table of zero columns and zero rows. |
EnhancedDefaultTableModel(int rowCount,
int columnCount)
Constructs an
EnhancedDefaultTableModel with
rowCount and columnCount of
null object values. |
EnhancedDefaultTableModel(java.lang.Object[][] data,
java.lang.Object[] columnNames)
Constructs an
EnhancedDefaultTableModel and initializes the table
by passing data and columnNames
to the setDataVector
method. |
EnhancedDefaultTableModel(java.lang.Object[] columnNames,
int rowCount)
Constructs an
EnhancedDefaultTableModel with as many
columns as there are elements in columnNames
and rowCount of null
object values. |
EnhancedDefaultTableModel(java.util.Vector columnNames,
int rowCount)
Constructs an
EnhancedDefaultTableModel with as many columns
as there are elements in columnNames
and rowCount of null
object values. |
EnhancedDefaultTableModel(java.util.Vector data,
java.util.Vector columnNames)
Constructs an
EnhancedDefaultTableModel and initializes the table
by passing data and columnNames
to the setDataVector method. |
Modifier and Type | Method and Description |
---|---|
void |
fireTableChanged(javax.swing.event.TableModelEvent e)
Forwards the given notification event to all
TableModelListeners that registered
themselves as listeners for this table model. |
boolean |
getNotify()
Returns
true if notifications are enabled for all listeners. |
void |
setNotify(boolean notify)
Allows event notifications to be temporarily switched off for all
listeneres.
|
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, getRowCount, getValueAt, insertRow, insertRow, isCellEditable, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt
addTableModelListener, findColumn, fireTableCellUpdated, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
public EnhancedDefaultTableModel()
EnhancedDefaultTableModel
which is a table of zero columns and zero rows.public EnhancedDefaultTableModel(java.lang.Object[] columnNames, int rowCount)
EnhancedDefaultTableModel
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 EnhancedDefaultTableModel(java.util.Vector columnNames, int rowCount)
EnhancedDefaultTableModel
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 EnhancedDefaultTableModel(java.lang.Object[][] data, java.lang.Object[] columnNames)
EnhancedDefaultTableModel
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)
public EnhancedDefaultTableModel(java.util.Vector data, java.util.Vector columnNames)
EnhancedDefaultTableModel
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 EnhancedDefaultTableModel(int rowCount, int columnCount)
EnhancedDefaultTableModel
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 void setNotify(boolean notify)
notify
is true
, then event
notifications are enabled. If notify
is false
,
notifications are disabled.notify
- false to disable event notifications.getNotify()
public boolean getNotify()
true
if notifications are enabled for all listeners.
If notifications are disabled for all listeners, getNotify
returns false
.setNotify(boolean)
public void fireTableChanged(javax.swing.event.TableModelEvent e)
TableModelListeners
that registered
themselves as listeners for this table model.fireTableChanged
in class javax.swing.table.AbstractTableModel
e
- the event to be forwardedAbstractTableModel.addTableModelListener(javax.swing.event.TableModelListener)
,
TableModelEvent
,
EventListenerList