oracle.ide.controls
Class InputTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
oracle.ide.controls.DefaultListTableModel
oracle.ide.controls.InputTableModel
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.table.TableModel
- public class InputTableModel
- extends DefaultListTableModel
- See Also:
- Serialized Form
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Method Summary |
void |
addColumn(java.lang.Object columnName)
Adds a column to the model. |
void |
addColumn(java.lang.Object columnName,
java.util.List columnData)
Adds a column to the model. |
void |
addColumn(java.lang.Object columnName,
java.lang.Object[] columnData)
Adds a column to the model. |
void |
addColumn(java.lang.String displayName,
boolean editable)
|
void |
clearAllRows()
|
java.lang.Class |
getColumnClass(int column)
This allows different renderers to be used based on the column data |
boolean |
isCellEditable(int row,
int column)
Returns true if the column allows edits; false otherwise. |
void |
setColumnEditable(int column,
boolean editable)
|
void |
setColumnEditable(java.lang.String colName,
boolean editable)
|
Methods inherited from class oracle.ide.controls.DefaultListTableModel |
addRow, addRow, convertToList, convertToList, getColumnCount, getColumnName, getDataList, getRowCount, getValueAt, insertRow, insertRow, isEditable, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataList, setDataList, setEditable, setNumRows, setRowCount, setValueAt |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InputTableModel
public InputTableModel()
InputTableModel
public InputTableModel(java.util.List dataList,
InputTableModel.ColumnMetaData[] columnMetaData)
addColumn
public void addColumn(java.lang.String displayName,
boolean editable)
addColumn
public void addColumn(java.lang.Object columnName)
- Adds a column to the model. The new column will have the
identifier
columnName
. This method will send a
tableChanged
notification message to all the listeners.
This method is a cover for addColumn(Object, List)
which
uses null
as the data list. The column will be defaulted
as editable.
- Overrides:
addColumn
in class DefaultListTableModel
- Parameters:
columnName
- the identifier of the column being added
- Throws:
java.lang.IllegalArgumentException
- if columnName
is null
addColumn
public void addColumn(java.lang.Object columnName,
java.util.List columnData)
- Adds a column to the model. The new column will have the
identifier
columnName
. columnData
is the
optional list of data for the column. If it is null
the column is filled with null
values. Otherwise,
the new data will be added to model starting with the first
element going to row 0, etc. This method will send a
tableChanged
notification message to all the listeners.
The column will be defaulted as editable.
- Overrides:
addColumn
in class DefaultListTableModel
- Parameters:
columnName
- the identifier of the column being addedcolumnData
- optional data of the column being added
- Throws:
java.lang.IllegalArgumentException
- if columnName
is null
addColumn
public void addColumn(java.lang.Object columnName,
java.lang.Object[] columnData)
- Adds a column to the model. The new column will have the
identifier
columnName
. columnData
is the
optional array of data for the column. If it is null
the column is filled with null
values. Otherwise,
the new data will be added to model starting with the first
element going to row 0, etc. This method will send a
tableChanged
notification message to all the listeners.
The column will be defaulted as editable.
- Overrides:
addColumn
in class DefaultListTableModel
- See Also:
addColumn(Object, List)
isCellEditable
public boolean isCellEditable(int row,
int column)
- Returns true if the column allows edits; false otherwise.
- Specified by:
isCellEditable
in interface javax.swing.table.TableModel
- Overrides:
isCellEditable
in class DefaultListTableModel
- Parameters:
row
- the row whose value is to be queriedcolumn
- the column whose value is to be queried
- Returns:
- true
- See Also:
DefaultListTableModel.setValueAt(java.lang.Object, int, int)
getColumnClass
public java.lang.Class getColumnClass(int column)
- This allows different renderers to be used based on the column data
setColumnEditable
public void setColumnEditable(java.lang.String colName,
boolean editable)
setColumnEditable
public void setColumnEditable(int column,
boolean editable)
clearAllRows
public void clearAllRows()
Copyright © 1997, 2004, Oracle. All rights reserved.