|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
javax.swing.table.DefaultTableModel
com.metamatrix.toolbox.ui.widget.table.DefaultTableModel
public class DefaultTableModel
This is the default implementation of EnhancedTableModel used by a TableWidget when the TableModel is not passed in the constructor.
Field Summary |
---|
Fields inherited from class javax.swing.table.DefaultTableModel |
---|
columnIdentifiers, dataVector |
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
DefaultTableModel()
|
|
DefaultTableModel(int rowCount,
int columnCount)
|
|
DefaultTableModel(java.lang.Object[][] data,
java.lang.Object[] columnNames)
|
|
DefaultTableModel(java.util.Vector columnNames)
|
|
DefaultTableModel(java.util.Vector columnNames,
int rowCount)
|
|
DefaultTableModel(java.util.Vector data,
java.util.Vector columnNames)
|
Method Summary | |
---|---|
void |
addColumn(java.lang.Object columnName,
java.util.Vector columnData)
Overridden to add an entry to the column edit status list. |
protected void |
addColumnEditStatus()
Adds an entry to the column edit status list. |
protected void |
createColumnEditStatusList()
Creates the column edit status list if necessary. |
protected void |
initializeDefaultTableModel()
Creates column edit status list. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
boolean |
isColumnEditable(int columnIndex)
|
boolean |
isEditable()
|
boolean |
isRowEditable(int rowIndex)
|
void |
setCellEditable(int rowIndex,
int columnIndex,
boolean isCellEditable)
Sets the specified cell to the specified editability. |
void |
setColumnEditable(int columnIndex,
boolean isEditable)
Sets all cells within the specified column to the specified editability. |
protected void |
setColumnEditStatusList(java.util.Vector columnNames)
|
void |
setColumnIdentifiers(java.util.Vector columnNames)
Overridden to add entries to the column edit status list if the specified number of columnNames is greater than the current number of column edit status entries. |
void |
setDataVector(java.util.Vector data,
java.util.Vector columnNames)
Overridden to force firing of deletion event before insertion event. |
void |
setEditable(boolean isEditable)
Sets all cells within the model to the specified editability. |
void |
setRowEditable(int rowIndex,
boolean isEditable)
Sets all cells within the specified row to the specified editability. |
void |
setValueAt(java.lang.Object value,
int rowIndex,
int columnIndex)
|
Methods inherited from class javax.swing.table.DefaultTableModel |
---|
addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, getRowCount, getValueAt, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setDataVector, setNumRows, setRowCount |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.metamatrix.toolbox.ui.widget.table.EnhancedTableModel |
---|
getDataVector |
Methods inherited from interface javax.swing.table.TableModel |
---|
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, removeTableModelListener |
Constructor Detail |
---|
public DefaultTableModel()
public DefaultTableModel(java.util.Vector columnNames)
public DefaultTableModel(int rowCount, int columnCount)
public DefaultTableModel(java.util.Vector columnNames, int rowCount)
public DefaultTableModel(java.util.Vector data, java.util.Vector columnNames)
public DefaultTableModel(java.lang.Object[][] data, java.lang.Object[] columnNames)
Method Detail |
---|
public void addColumn(java.lang.Object columnName, java.util.Vector columnData)
addColumn
in class javax.swing.table.DefaultTableModel
protected void addColumnEditStatus()
protected void createColumnEditStatusList()
protected void initializeDefaultTableModel()
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.DefaultTableModel
rowIndex
- The cell's row indexcolumnIndex
- The cell's column index
public boolean isColumnEditable(int columnIndex)
isColumnEditable
in interface EnhancedTableModel
columnIndex
- The column's index
public boolean isEditable()
isEditable
in interface EnhancedTableModel
public boolean isRowEditable(int rowIndex)
isRowEditable
in interface EnhancedTableModel
rowIndex
- The cell's row index
public void setCellEditable(int rowIndex, int columnIndex, boolean isCellEditable)
setCellEditable
in interface EnhancedTableModel
rowIndex
- The cell's row indexcolumnIndex
- The cell's column indexisEditable
- True if the cell is to be set to editablepublic void setColumnEditable(int columnIndex, boolean isEditable)
setColumnEditable
in interface EnhancedTableModel
columnIndex
- The column's indexisEditable
- True if the column's cells are to be set to editableprotected void setColumnEditStatusList(java.util.Vector columnNames)
public void setColumnIdentifiers(java.util.Vector columnNames)
setColumnIdentifiers
in interface EnhancedTableModel
setColumnIdentifiers
in class javax.swing.table.DefaultTableModel
public void setDataVector(java.util.Vector data, java.util.Vector columnNames)
setDataVector
in class javax.swing.table.DefaultTableModel
public void setEditable(boolean isEditable)
setEditable
in interface EnhancedTableModel
isEditable
- True if the cells are to be set to editablepublic void setRowEditable(int rowIndex, boolean isEditable)
setRowEditable
in interface EnhancedTableModel
rowIndex
- The row's indexisEditable
- True if the row's cells are to be set to editablepublic void setValueAt(java.lang.Object value, int rowIndex, int columnIndex)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.DefaultTableModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |