public class IlvFlatTableToTableModel extends AbstractTableModel implements TableModel, IlvTableModel, Cloneable
TableModel
view on a given
IlvFlatTableModel
.
It also implements the IlvTableModel
operations if the given model
is an instance of IlvDefaultFlatTableModel
.
listenerList
Constructor and Description |
---|
IlvFlatTableToTableModel()
Creates a table model, initially representing nothing.
|
IlvFlatTableToTableModel(IlvFlatTableModel model)
Creates a table model, initially representing the given
model . |
Modifier and Type | Method and Description |
---|---|
void |
addRow(Object[] rowData)
Adds a row to the end of the model.
|
Object |
clone()
Returns a copy of this object.
|
void |
disconnect()
Drops references to objects to help garbage collection.
|
void |
dispose()
Cleans up this model and drops references to objects to
help garbage collection.
|
Class |
getColumnClass(int columnIndex) |
int |
getColumnCount() |
String |
getColumnName(int columnIndex) |
int |
getRowCount() |
IlvFlatTableModel |
getUnderlyingModel()
Returns the underlying model.
|
Object |
getValueAt(int rowIndex,
int columnIndex) |
void |
insertRow(int rowIndex,
Object[] rowData)
Inserts a row at
row in the model. |
void |
removeRow(int rowIndex)
Removes the row at
row from the model. |
void |
setUnderlyingModel(IlvFlatTableModel model)
Sets the underlying model.
|
void |
setValueAt(Object value,
int rowIndex,
int columnIndex) |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addTableModelListener, isCellEditable, removeTableModelListener
public IlvFlatTableToTableModel()
public IlvFlatTableToTableModel(IlvFlatTableModel model)
model
.public int getRowCount()
getRowCount
in interface TableModel
public int getColumnCount()
getColumnCount
in interface TableModel
public String getColumnName(int columnIndex)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
public Class getColumnClass(int columnIndex)
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
public Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface TableModel
public void setValueAt(Object value, int rowIndex, int columnIndex)
setValueAt
in interface TableModel
setValueAt
in class AbstractTableModel
public void addRow(Object[] rowData)
IlvTableModel
null
values unless rowData
is specified.
Notification of the row being added will be generated.addRow
in interface IlvTableModel
rowData
- optional data of the row being addedpublic void insertRow(int rowIndex, Object[] rowData)
IlvTableModel
row
in the model. The new row
will contain null
values unless rowData
is specified. Notification of the row being added will be generated.
IlvTableModel
might not be able to
fulfill the contract of adding the row at given index.
That's why it is preferable to use IlvTableModel.addRow(Object[])
instead.insertRow
in interface IlvTableModel
rowIndex
- the row index of the row to be insertedrowData
- optional data of the row being addedpublic void removeRow(int rowIndex)
IlvTableModel
row
from the model. Notification
of the row being removed will be sent to all the listeners.removeRow
in interface IlvTableModel
rowIndex
- the row index of the row to be removedpublic IlvFlatTableModel getUnderlyingModel()
IlvFlatTableModel
, or null
denoting
an empty model.public void setUnderlyingModel(IlvFlatTableModel model)
model
- A model, or null
denoting an empty model.public void dispose()
Note: After calling this function, this model is no longer functional.
public void disconnect()
Note: After calling this function, and after some changes occurred in the underlying model, this model is no longer functional.
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.