public class IlvPropertyBasedFlatListModel extends IlvDefaultFlatListModel
IlvFlatListModel
interface which stores the objects and the column info objects locally
in this instance. The values are assumed to be properties of the objects.BEFORE_COLUMN_REMOVED_MASK, BEFORE_DATA_CHANGE_MASK, BEFORE_OBJECTS_REMOVED_MASK
Constructor and Description |
---|
IlvPropertyBasedFlatListModel(Collection objects,
IlvPropertyConnector propaccess,
IlvDataColumnInfo[] columns)
Creates a model with the given objects and the given columns.
|
IlvPropertyBasedFlatListModel(IlvPropertyConnector propaccess)
Creates an empty model, with zero columns.
|
IlvPropertyBasedFlatListModel(IlvPropertyConnector propaccess,
IlvDataColumnInfo[] columns)
Creates an empty model, with the given columns.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a copy of this object.
|
protected ilog.views.chart.datax.flat.internal.storage.IlvColumnStorage |
createColumnStorage(IlvDataColumnInfo column)
Creates the backing storage for a column value.
|
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.
|
double |
getDoubleAt(Object object,
int columnIndex)
Returns the value for the attribute number
columnIndex
in the given object. |
int |
getSupportedEventsMask()
Returns a bit mask denoting the optional kinds of events that are guaranteed
to be sent by this model to the registered listeners.
|
Object |
getValueAt(Object object,
int columnIndex)
Returns the value for the attribute number
columnIndex
in the given object. |
protected void |
internalObjectsAdd(int index,
Object object)
Adds an object to the list of objects internally stored in this model.
|
protected void |
internalObjectsRemove(int index)
Removes an object from the list of objects internally stored in this model.
|
protected void |
internalObjectsSet(int index,
Object object)
Replaces an object in the list of objects internally stored in this model.
|
protected boolean |
setDoubleAtInternal(double value,
Object object,
int columnIndex,
boolean forReal)
Does the equivalent of a
setDoubleAt() . |
protected boolean |
setValueAtInternal(Object value,
Object object,
int columnIndex,
boolean forReal)
Does the equivalent of a
setValueAt() . |
addObject, addObject, clear, getIndexOf, getObjectAt, getObjects, insertObject, insertObject, insertObjects, isColumnComputed, removeObject, removeObjects, setDoubleAt, setObjects, setValueAt
addColumn, addColumn, addColumn, fireModelEvent, getColumn, getColumnCount, getColumns, insertColumn, insertColumn, insertColumn, removeColumn, setColumn, setColumnCount, setColumns
addFlatListModelListener, convertToDouble, endBatch, removeFlatListModelListener, startBatch
public IlvPropertyBasedFlatListModel(IlvPropertyConnector propaccess)
public IlvPropertyBasedFlatListModel(IlvPropertyConnector propaccess, IlvDataColumnInfo[] columns)
public IlvPropertyBasedFlatListModel(Collection objects, IlvPropertyConnector propaccess, IlvDataColumnInfo[] columns)
public Object getValueAt(Object object, int columnIndex)
columnIndex
in the given object.getValueAt
in interface IlvFlatListModel
getValueAt
in interface IlvObjectModelWithColumns
getValueAt
in class IlvDefaultFlatListModel
object
- The object (row) in which the value is to be looked up.columnIndex
- The column denoting the attribute whose value is to be
looked up.public double getDoubleAt(Object object, int columnIndex)
columnIndex
in the given object.
This method should only be used for columns whose type is
Double. For other types of columns, this method will do a conversion
from the object returned by getValueAt
, which may be
inefficient or inaccurate or raise exceptions.
getDoubleAt
in interface IlvFlatListModel
getDoubleAt
in interface IlvObjectModelWithColumns
getDoubleAt
in class IlvDefaultFlatListModel
object
- The object (row) in which the value is to be looked up.columnIndex
- The column denoting the attribute whose value is to be
looked up.protected boolean setValueAtInternal(Object value, Object object, int columnIndex, boolean forReal)
setValueAt()
. Instead of notifying, it simply returns
a boolean
indicating whether notification should be done.
If forReal is false
, the value is not actually set, but the
method still returns the same Boolean, specifying whether the given value is
different from the previous one.
setValueAtInternal
in class IlvDefaultFlatListModel
protected boolean setDoubleAtInternal(double value, Object object, int columnIndex, boolean forReal)
setDoubleAt()
. Instead of notifying, it simply returns
a boolean
indicating whether notification should be done.
If forReal is false
, the value is not actually set, but the
method still returns the same Boolean, specifying whether the given value is
different from the previous one.
setDoubleAtInternal
in class IlvDefaultFlatListModel
public int getSupportedEventsMask()
This implementation returns
BEFORE_OBJECTS_REMOVED_MASK | BEFORE_COLUMN_REMOVED_MASK
.
It may need to be overridden in subclasses.
getSupportedEventsMask
in interface IlvFlatListModel
getSupportedEventsMask
in class IlvDefaultFlatListModel
IlvFlatListModel.BEFORE_DATA_CHANGE_MASK
,
IlvFlatListModel.BEFORE_OBJECTS_REMOVED_MASK
,
IlvFlatListModel.BEFORE_COLUMN_REMOVED_MASK
protected void internalObjectsAdd(int index, Object object)
internalObjectsAdd
in class IlvDefaultFlatListModel
protected void internalObjectsRemove(int index)
internalObjectsRemove
in class IlvDefaultFlatListModel
protected void internalObjectsSet(int index, Object object)
internalObjectsSet
in class IlvDefaultFlatListModel
protected ilog.views.chart.datax.flat.internal.storage.IlvColumnStorage createColumnStorage(IlvDataColumnInfo column)
null
if the methods
getValueAt
and getDoubleAt
do not need
backing store.createColumnStorage
in class IlvDefaultFlatListModel
public void dispose()
Note: After calling this function, this model is no longer functional.
dispose
in class IlvDefaultFlatListModel
public void disconnect()
Note: After calling this function, and after some changes occurred in the underlying columns or in the contained objects, this model is no longer functional.
disconnect
in class IlvBasicFlatListModel
public Object clone()
clone
in class IlvDefaultFlatListModel
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.