public class IlvTreeSetToTreeListModel extends IlvAbstractTreeListModel
IlvTreeListModel
, based on an
IlvTreeSetModel
and a Comparator
that is used
to order the children objects of any node in the tree.BEFORE_COLUMN_REMOVED_MASK, BEFORE_DATA_CHANGE_MASK, BEFORE_OBJECTS_REMOVED_MASK, DURING_OBJECTS_REMOVED_MASK
Constructor and Description |
---|
IlvTreeSetToTreeListModel(IlvTreeSetModel model,
Comparator sortCriterion)
Creates an
IlvTreeListModel from an
IlvTreeSetModel and a Comparator . |
IlvTreeSetToTreeListModel(IlvTreeSetModel model,
Comparator sortCriterion,
int eventsMaskHint)
Creates an
IlvTreeListModel from an
IlvTreeSetModel 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.
|
List |
getChildren(Object parent)
This method is implemented through a call to the underlying model,
followed by sorting.
|
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.
|
TreePath |
getPath(Object object)
This method is implemented through a call to the underlying model.
|
Object |
getRoot()
This method is implemented through a call to the underlying model.
|
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.
|
addTreeListModelListener, convertToDouble, endBatch, fireModelEvent, postOrderIterator, preOrderIterator, removeTreeListModelListener, startBatch
public IlvTreeSetToTreeListModel(IlvTreeSetModel model, Comparator sortCriterion)
IlvTreeListModel
from an
IlvTreeSetModel
and a Comparator
.model
- The underlying model.sortCriterion
- Sorting criterion: null
means the
natural sorting order for objects implementing
the Comparable
interface.IlvColumnValueComparator
public IlvTreeSetToTreeListModel(IlvTreeSetModel model, Comparator sortCriterion, int eventsMaskHint)
IlvTreeListModel
from an
IlvTreeSetModel
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 Object getRoot()
public List getChildren(Object parent)
public TreePath getPath(Object object)
getPath
in interface IlvTreeListModel
getPath
in class IlvAbstractTreeListModel
object
- An object in the model.TreePath
whose first component is
getRoot()
and whose last component is the given
object.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 | DURING_OBJECTS_REMOVED_MASK | BEFORE_COLUMN_REMOVED_MASK
.
It may need to be overridden in subclasses.
getSupportedEventsMask
in interface IlvTreeListModel
getSupportedEventsMask
in class IlvAbstractTreeListModel
IlvTreeListModel.BEFORE_DATA_CHANGE_MASK
,
IlvTreeListModel.BEFORE_OBJECTS_REMOVED_MASK
,
IlvTreeListModel.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 IlvAbstractTreeListModel
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.