public class IlvPropertyBasedTreeSetModel extends IlvDefaultTreeSetModel
IlvTreeSetModel
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, DURING_OBJECTS_REMOVED_MASK
Constructor and Description |
---|
IlvPropertyBasedTreeSetModel(IlvPropertyConnector propaccess)
Creates an empty model, with zero columns.
|
IlvPropertyBasedTreeSetModel(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.
|
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 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() . |
addChild, addChildren, clear, getChildren, getParent, getPath, getRoot, removeAllChildren, removeChild, removeChildren, setChildren, setDoubleAt, setRoot, setValueAt
addColumn, addColumn, fireModelEvent, getColumn, getColumnCount, getColumns, insertColumn, insertColumn, removeColumn, setColumn, setColumnCount, setColumns
addTreeSetModelListener, convertToDouble, endBatch, postOrderIterator, preOrderIterator, removeTreeSetModelListener, startBatch
public IlvPropertyBasedTreeSetModel(IlvPropertyConnector propaccess)
public IlvPropertyBasedTreeSetModel(IlvPropertyConnector propaccess, IlvDataColumnInfo[] columns)
public Object getValueAt(Object object, int columnIndex)
columnIndex
in the given object.getValueAt
in interface IlvObjectModelWithColumns
getValueAt
in interface IlvTreeSetModel
getValueAt
in class IlvDefaultTreeSetModel
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 IlvObjectModelWithColumns
getDoubleAt
in interface IlvTreeSetModel
getDoubleAt
in class IlvDefaultTreeSetModel
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, indicating whether the given value is
different from the previous one.
setValueAtInternal
in class IlvDefaultTreeSetModel
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, indicating whether the given value is
different from the previous one.
setDoubleAtInternal
in class IlvDefaultTreeSetModel
public int getSupportedEventsMask()
This implementation returns
BEFORE_OBJECTS_REMOVED_MASK | DURING_OBJECTS_REMOVED_MASK | BEFORE_COLUMN_REMOVED_MASK
.
It may need to be overridden in subclasses.
getSupportedEventsMask
in interface IlvTreeSetModel
getSupportedEventsMask
in class IlvDefaultTreeSetModel
IlvTreeSetModel.BEFORE_DATA_CHANGE_MASK
,
IlvTreeSetModel.BEFORE_OBJECTS_REMOVED_MASK
,
IlvTreeSetModel.BEFORE_COLUMN_REMOVED_MASK
public void dispose()
Note: After calling this function, this model is no longer functional.
dispose
in class IlvDefaultTreeSetModel
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 IlvBasicTreeSetModel
public Object clone()
clone
in class IlvDefaultTreeSetModel
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.