public abstract class IlvAbstractTreeListModel extends Object implements IlvTreeListModel, IlvDataConverter, Cloneable
IlvTreeListModel
interface which handles the notification to listeners of the model.
However, it does not constrain the nature of the objects stored in the model or of their attributes.
BEFORE_COLUMN_REMOVED_MASK, BEFORE_DATA_CHANGE_MASK, BEFORE_OBJECTS_REMOVED_MASK, DURING_OBJECTS_REMOVED_MASK
Constructor and Description |
---|
IlvAbstractTreeListModel()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addTreeListModelListener(TreeListModelListener listener)
Adds a listener.
|
Object |
clone()
Returns a copy of this object.
|
double |
convertToDouble(Object value)
Converts an object to a double.
|
void |
endBatch()
Terminates a group of modifications.
|
void |
fireModelEvent(TreeListModelEvent event)
Notifies the listeners of a model event.
|
TreePath |
getPath(Object object)
Returns the path from the root to 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.
|
Iterator |
postOrderIterator()
Returns an iterator that visits each object once.
|
Iterator |
preOrderIterator()
Returns an iterator that visits each object once.
|
void |
removeTreeListModelListener(TreeListModelListener listener)
Removes a listener.
|
void |
startBatch()
Starts a group of modifications.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildren, getColumn, getColumnCount, getDoubleAt, getRoot, getValueAt, setDoubleAt, setValueAt
public IlvAbstractTreeListModel()
public void startBatch()
startBatch
in interface IlvTreeListModel
startBatch
in interface IlvBatchable
public void fireModelEvent(TreeListModelEvent event)
public void endBatch()
endBatch
in interface IlvTreeListModel
endBatch
in interface IlvBatchable
public void addTreeListModelListener(TreeListModelListener listener)
addTreeListModelListener
in interface IlvTreeListModel
public void removeTreeListModelListener(TreeListModelListener listener)
removeTreeListModelListener
in interface IlvTreeListModel
public int getSupportedEventsMask()
This implementation returns 0. It ought to be overridden in subclasses.
getSupportedEventsMask
in interface IlvTreeListModel
IlvTreeListModel.BEFORE_DATA_CHANGE_MASK
,
IlvTreeListModel.BEFORE_OBJECTS_REMOVED_MASK
,
IlvTreeListModel.BEFORE_COLUMN_REMOVED_MASK
public TreePath getPath(Object object)
Note: This default implementation is quite inefficient. Starting at the first invocation of this method, it builds up a hash table mapping each object to its tree path. Subclasses should override this implementation, whenever a less memory hungry implementation is possible.
getPath
in interface IlvTreeListModel
object
- An object in the model.TreePath
whose first component is
getRoot()
and whose last component is the given
object.public Iterator preOrderIterator()
public Iterator postOrderIterator()
public double convertToDouble(Object value)
getDoubleAt
for columns that are not
of type Double.convertToDouble
in interface IlvDataConverter
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.