public class IlvFlatSetToFlatListModel extends IlvAbstractFlatListModel
IlvFlatListModel
, based on an
IlvFlatSetModel
and a Comparator
that is used
to order the objects.BEFORE_COLUMN_REMOVED_MASK, BEFORE_DATA_CHANGE_MASK, BEFORE_OBJECTS_REMOVED_MASK
Constructor and Description |
---|
IlvFlatSetToFlatListModel(IlvFlatSetModel model,
Comparator sortCriterion)
Creates an
IlvFlatListModel from an
IlvFlatSetModel and a Comparator . |
IlvFlatSetToFlatListModel(IlvFlatSetModel model,
Comparator sortCriterion,
int eventsMaskHint)
Creates an
IlvFlatListModel from an
IlvFlatSetModel and a Comparator . |
Modifier and Type | Method and Description |
---|---|
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.
|
IlvDataColumnInfo |
getColumn(int columnIndex)
This method is implemented through a call to the underlying model.
|
int |
getColumnCount()
This method is implemented through a call to the underlying model.
|
double |
getDoubleAt(Object object,
int columnIndex)
This method is implemented through a call to the underlying model.
|
List |
getObjects()
This method returns the sorted list of objects.
|
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)
This method is implemented through a call to the underlying model.
|
void |
setDoubleAt(double value,
Object object,
int columnIndex)
This method is implemented through a call to the underlying model.
|
void |
setValueAt(Object value,
Object object,
int columnIndex)
This method is implemented through a call to the underlying model.
|
addFlatListModelListener, convertToDouble, endBatch, fireModelEvent, removeFlatListModelListener, startBatch
public IlvFlatSetToFlatListModel(IlvFlatSetModel model, Comparator sortCriterion)
IlvFlatListModel
from an
IlvFlatSetModel
and a Comparator
.model
- The underlying model.sortCriterion
- Sorting criterion: null
means the
natural sorting order for objects implementing
the Comparable
interface.IlvColumnValueComparator
public IlvFlatSetToFlatListModel(IlvFlatSetModel model, Comparator sortCriterion, int eventsMaskHint)
IlvFlatListModel
from an
IlvFlatSetModel
and a Comparator
.model
- The underlying model.sortCriterion
- Sorting criterion: null
means the
natural sorting order for objects implementing
the Comparable
interface.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.IlvColumnValueComparator
public List getObjects()
public int getColumnCount()
public Object getValueAt(Object object, int columnIndex)
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 void setValueAt(Object value, Object object, int columnIndex)
value
- The new value.object
- The object (row) in which the value is to be changed.columnIndex
- The column denoting the attribute whose value is to be
changed.public double getDoubleAt(Object object, int columnIndex)
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 void setDoubleAt(double value, Object object, int columnIndex)
value
- The new value.object
- The object (row) in which the value is to be changed.columnIndex
- The column denoting the attribute whose value is to be
changed.public IlvDataColumnInfo getColumn(int columnIndex)
columnIndex
- The column.public int getSupportedEventsMask()
This implementation returns the event mask of the underlying model,
intersected with the eventsMaskHint constructor argument and
with
BEFORE_DATA_CHANGE_MASK | BEFORE_OBJECTS_REMOVED_MASK | BEFORE_COLUMN_REMOVED_MASK
.
It may need to be overridden in subclasses.
getSupportedEventsMask
in interface IlvFlatListModel
getSupportedEventsMask
in class IlvAbstractFlatListModel
IlvFlatListModel.BEFORE_DATA_CHANGE_MASK
,
IlvFlatListModel.BEFORE_OBJECTS_REMOVED_MASK
,
IlvFlatListModel.BEFORE_COLUMN_REMOVED_MASK
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.
public Object clone()
clone
in class IlvAbstractFlatListModel
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.