public class IlvListToFlatTableModel extends IlvFlatListToFlatTableModel
IlvFlatTableModel
, based on a
Swing ListModel
.
The table columns are the properties of the list elements.
Note: This model supports adding and removing rows if and only if the
underlying ListModel
is an instance of
DefaultListModel
, and an IlvObjectFactory
has been
given as constructor argument.
BEFORE_COLUMN_REMOVED_MASK, BEFORE_DATA_CHANGE_MASK, BEFORE_ROWS_REMOVED_MASK
Constructor and Description |
---|
IlvListToFlatTableModel(DefaultListModel model,
IlvPropertyConnector propaccess,
IlvObjectFactory creator)
Creates a model backed by a given
ListModel , with the ability to add
or remove rows, and with zero columns. |
IlvListToFlatTableModel(DefaultListModel model,
IlvPropertyConnector propaccess,
IlvObjectFactory creator,
IlvDataColumnInfo[] columns)
Creates a model backed by a given
ListModel , with the ability to add
or remove rows, and with the given columns. |
IlvListToFlatTableModel(DefaultListModel model,
IlvPropertyConnector propaccess,
IlvObjectFactory creator,
IlvDataColumnInfo[] columns,
int eventsMaskHint)
Creates a model backed by a given
ListModel , with the ability to add
or remove rows, and with the given columns. |
IlvListToFlatTableModel(DefaultListModel model,
IlvPropertyConnector propaccess,
IlvObjectFactory creator,
int eventsMaskHint)
Creates a model backed by a given
ListModel , with the ability to add
or remove rows, and with zero columns. |
IlvListToFlatTableModel(ListModel model,
IlvPropertyConnector propaccess)
Creates a model backed by a given
ListModel , with zero columns. |
IlvListToFlatTableModel(ListModel model,
IlvPropertyConnector propaccess,
IlvDataColumnInfo[] columns)
Creates a model backed by a given
ListModel , with the given columns. |
IlvListToFlatTableModel(ListModel model,
IlvPropertyConnector propaccess,
IlvDataColumnInfo[] columns,
int eventsMaskHint)
Creates a model backed by a given
ListModel , with the given columns. |
IlvListToFlatTableModel(ListModel model,
IlvPropertyConnector propaccess,
int eventsMaskHint)
Creates a model backed by a given
ListModel , with zero columns. |
Modifier and Type | Method and Description |
---|---|
void |
addColumn(IlvDataColumnInfo column)
Adds a column to the model.
|
void |
addColumn(IlvDataColumnInfo column,
double[] data)
Adds a column with given data to the model.
|
void |
addColumn(IlvDataColumnInfo column,
Object[] data)
Adds a column with given data to 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.
|
void |
insertColumn(int columnIndex,
IlvDataColumnInfo column)
Adds a column to the model at a given index.
|
void |
insertColumn(int columnIndex,
IlvDataColumnInfo column,
double[] data)
Adds a column with given data to the model at a given index.
|
void |
insertColumn(int columnIndex,
IlvDataColumnInfo column,
Object[] data)
Adds a column with given data to the model at a given index.
|
void |
removeColumn(int columnIndex)
Removes a column from the model.
|
void |
setColumn(int i,
IlvDataColumnInfo column)
Replaces or adds a column.
|
void |
setColumnCount(int columnCount)
Sets the number of columns in the model.
|
void |
setColumns(List<IlvDataColumnInfo> columns)
Sets the list of columns.
|
createColumnStorage, getDoubleAt, getIndexOf, getObjectAt, getRowCount, getSupportedEventsMask, getUnderlyingModel, getValueAt, insertRow, insertRows, isColumnComputed, removeRows, setDoubleAtInternal, setRowCount, setValueAtInternal
addRow, addRow, insertRow, removeRow
fireModelEvent, getColumn, getColumnCount, getColumns, setDoubleAt, setValueAt
addFlatTableModelListener, convertToDouble, endBatch, removeFlatTableModelListener, startBatch
public IlvListToFlatTableModel(ListModel model, IlvPropertyConnector propaccess)
ListModel
, with zero columns.
Note: No rows can be added or removed when this constructor is used.
model
- The underlying model.propaccess
- The mechanism to access properties.public IlvListToFlatTableModel(ListModel model, IlvPropertyConnector propaccess, int eventsMaskHint)
ListModel
, with zero columns.
Note: No rows can be added or removed when this constructor is used.
model
- The underlying model.propaccess
- The mechanism to access properties.eventsMaskHint
- Desired events mask. This is just a hint; there is
no guarantee that the event types designated by the
mask are supported by this model.public IlvListToFlatTableModel(DefaultListModel model, IlvPropertyConnector propaccess, IlvObjectFactory creator)
ListModel
, with the ability to add
or remove rows, and with zero columns.model
- The underlying model.propaccess
- The mechanism to access properties.creator
- Factory for new objects in the model.public IlvListToFlatTableModel(DefaultListModel model, IlvPropertyConnector propaccess, IlvObjectFactory creator, int eventsMaskHint)
ListModel
, with the ability to add
or remove rows, and with zero columns.model
- The underlying model.propaccess
- The mechanism to access properties.creator
- Factory for new objects in the model.eventsMaskHint
- Desired events mask. This is just a hint; there is
no guarantee that the event types designated by the
mask are supported by this model.public IlvListToFlatTableModel(ListModel model, IlvPropertyConnector propaccess, IlvDataColumnInfo[] columns)
ListModel
, with the given columns.
Note: No rows can be added or removed when this constructor is used.
model
- The underlying model.propaccess
- The mechanism to access properties.columns
- The list of columns of this model.public IlvListToFlatTableModel(ListModel model, IlvPropertyConnector propaccess, IlvDataColumnInfo[] columns, int eventsMaskHint)
ListModel
, with the given columns.
Note: No rows can be added or removed when this constructor is used.
model
- The underlying model.propaccess
- The mechanism to access properties.columns
- The list of columns of this model.eventsMaskHint
- Desired events mask. This is just a hint; there is
no guarantee that the event types designated by the
mask are supported by this model.public IlvListToFlatTableModel(DefaultListModel model, IlvPropertyConnector propaccess, IlvObjectFactory creator, IlvDataColumnInfo[] columns)
ListModel
, with the ability to add
or remove rows, and with the given columns.model
- The underlying model.propaccess
- The mechanism to access properties.creator
- Factory for new objects in the model.columns
- The list of columns of this model.public IlvListToFlatTableModel(DefaultListModel model, IlvPropertyConnector propaccess, IlvObjectFactory creator, IlvDataColumnInfo[] columns, int eventsMaskHint)
ListModel
, with the ability to add
or remove rows, and with the given columns.model
- The underlying model.propaccess
- The mechanism to access properties.creator
- Factory for new objects in the model.columns
- The list of columns of this model.eventsMaskHint
- Desired events mask. This is just a hint; there is
no guarantee that the event types designated by the
mask are supported by this model.public void setColumnCount(int columnCount)
IlvBasicFlatTableModel
columnCount
and greater are discarded.setColumnCount
in class IlvFlatListToFlatTableModel
columnCount
- The new number of columns.public void addColumn(IlvDataColumnInfo column)
IlvBasicFlatTableModel
addColumn
in class IlvBasicFlatTableModel
column
- The metainformation of this column.public void addColumn(IlvDataColumnInfo column, Object[] data)
IlvBasicFlatTableModel
addColumn
in class IlvBasicFlatTableModel
column
- The metainformation of this column.data
- The initial data of this column. This should be an array
of at least getRowCount()
elements. Unused if
the column is a computed column.public void addColumn(IlvDataColumnInfo column, double[] data)
IlvBasicFlatTableModel
addColumn
in class IlvBasicFlatTableModel
column
- The metainformation of this column.data
- The initial data of this column. This should be an array
of at least getRowCount()
elements. Unused if
the column is a computed column.public void insertColumn(int columnIndex, IlvDataColumnInfo column)
IlvBasicFlatTableModel
insertColumn
in class IlvFlatListToFlatTableModel
columnIndex
- The new column desired index, must be >= 0 and
<= getColumnCount()
.column
- The metainformation of this column.public void insertColumn(int columnIndex, IlvDataColumnInfo column, Object[] data)
IlvBasicFlatTableModel
insertColumn
in class IlvFlatListToFlatTableModel
columnIndex
- The new column desired index, must be >= 0 and
<= getColumnCount()
.column
- The metainformation of this column.data
- The initial data of this column. This should be an array
of at least getRowCount()
elements. Unused if
the column is a computed column.public void insertColumn(int columnIndex, IlvDataColumnInfo column, double[] data)
IlvBasicFlatTableModel
insertColumn
in class IlvFlatListToFlatTableModel
columnIndex
- The new column desired index, must be >= 0 and
<= getColumnCount()
.column
- The metainformation of this column.data
- The initial data of this column. This should be an array
of at least getRowCount()
elements. Unused if
the column is a computed column.public void removeColumn(int columnIndex)
IlvBasicFlatTableModel
removeColumn
in class IlvFlatListToFlatTableModel
columnIndex
- The column index, must be >= 0 and
< getColumnCount()
.public void setColumns(List<IlvDataColumnInfo> columns)
IlvBasicFlatTableModel
setColumns
in class IlvFlatListToFlatTableModel
columns
- A list of IlvDataColumnInfo
.public void setColumn(int i, IlvDataColumnInfo column)
IlvBasicFlatTableModel
removeColumn(i)
followed by
insertColumn(i, column)
.setColumn
in class IlvFlatListToFlatTableModel
column
- An IlvDataColumnInfo
.public void dispose()
Note: After calling this function, this model is no longer functional.
dispose
in class IlvFlatListToFlatTableModel
public void disconnect()
Note: After calling this function, and after some changes occurred in the underlying model or columns, this model is no longer functional.
disconnect
in class IlvFlatListToFlatTableModel
public Object clone()
clone
in class IlvFlatListToFlatTableModel
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.