public class TreeListModelEvent extends EventObject
IlvTreeListModel
.TreeListModelListener
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
TreeListModelEvent.Type
This class defines the event types of the outer event class.
|
source
Constructor and Description |
---|
TreeListModelEvent(IlvTreeListModel source,
TreeListModelEvent.Type type)
Creates an event.
|
TreeListModelEvent(IlvTreeListModel source,
TreeListModelEvent.Type type,
int column,
boolean oldValue,
boolean newValue)
Creates an event.
|
TreeListModelEvent(IlvTreeListModel source,
TreeListModelEvent.Type type,
int column,
IlvDataColumnInfo columnInfo)
Creates an event.
|
TreeListModelEvent(IlvTreeListModel source,
TreeListModelEvent.Type type,
int column,
Object oldValue,
Object newValue)
Creates an event.
|
TreeListModelEvent(IlvTreeListModel source,
TreeListModelEvent.Type type,
Object object,
TreePath objectPath,
boolean recursive,
int column)
Creates an event.
|
TreeListModelEvent(IlvTreeListModel source,
TreeListModelEvent.Type type,
Object parent,
TreePath parentPath,
Object[] oldObjects,
Object[] newObjects,
int firstIndex)
Creates an event.
|
Modifier and Type | Method and Description |
---|---|
int |
getColumn()
Returns the index of the affected column, or -1 for all columns.
|
IlvDataColumnInfo |
getColumnInfo()
Returns the metainformation of the affected column, or
null
for all columns. |
int |
getFirstIndex()
Returns the index of the first affected object among its parent
children list.
|
IlvTreeListModel |
getModel()
Returns the model this event comes from.
|
Object[] |
getNewObjects()
Returns the roots of the affected subtrees.
|
Object |
getNewValue()
Returns the new value inside the
IlvDataColumnInfo . |
Object |
getObject()
Returns the affected object.
|
TreePath |
getObjectPath()
Returns the path from the root to the affected object.
|
Object[] |
getOldObjects()
Returns the roots of the affected subtrees.
|
Object |
getOldValue()
Returns the old value inside the
IlvDataColumnInfo . |
Object |
getParent()
Returns the parent object of the roots of the affected subtrees, or
null for a root change. |
TreePath |
getParentPath()
Returns the path from the root to the parent object of the roots of the
affected subtrees, or
null for a root change. |
TreeListModelEvent.Type |
getType()
Returns the event type.
|
boolean |
isRecursive()
Returns
true if the entire subtree is affected, not just a single object. |
String |
toString()
Returns a
String representation of this event. |
getSource
public TreeListModelEvent(IlvTreeListModel source, TreeListModelEvent.Type type)
You are not meant to use this constructor. SERIES_BEGIN
and SERIES_END
are automatically generated by the class
IlvAbstractTreeListModel
.
source
- The model.type
- One of SERIES_BEGIN
, SERIES_END
.public TreeListModelEvent(IlvTreeListModel source, TreeListModelEvent.Type type, Object object, TreePath objectPath, boolean recursive, int column)
source
- The model.type
- One of DATA_CHANGED
, BEFORE_DATA_CHANGE
.object
- The object whose attributes have changed.objectPath
- The path from the root to the object.recursive
- true
if the attributes of the entire subtree have
changed, false
for a change affecting only the single
objectcolumn
- The column that changed, or -1 for all columns.public TreeListModelEvent(IlvTreeListModel source, TreeListModelEvent.Type type, Object parent, TreePath parentPath, Object[] oldObjects, Object[] newObjects, int firstIndex)
oldObjects
and newObjects
do not need to have the same length.
An addition of objects is represented by an event with empty oldObjects
.
A removal of objects is represented by an event with empty newObjects
.source
- The model.type
- One of OBJECTS_CHANGED
,
BEFORE_OBJECTS_REMOVED
, DURING_OBJECTS_REMOVED
.parent
- The parent object of the set of objects that were changed,
added or removed, or null
for a root change.parentPath
- The path from the root to the parent object, or
null
for a root change.oldObjects
- The set of objects that was in place before the change
(together with their entire subtrees), in the same order
as in source.getChildren(parent)
.newObjects
- The set of objects that is in place after the change
(together with their entire subtrees), in the same order
as in source.getChildren(parent)
.firstIndex
- The index of the first object (index after adding or
before removing the objects) in
source.getChildren(parent)
. The second
object is/was at firstIndex+1
, and so on.public TreeListModelEvent(IlvTreeListModel source, TreeListModelEvent.Type type, int column, IlvDataColumnInfo columnInfo)
source
- The model.type
- One of COLUMN_ADDED
, COLUMN_REMOVED
,
BEFORE_COLUMN_REMOVED
.column
- The column that was added or removed (index after adding
or before removing).columnInfo
- The IlvDataColumnInfo
of the column that was
added or removed.public TreeListModelEvent(IlvTreeListModel source, TreeListModelEvent.Type type, int column, Object oldValue, Object newValue)
source
- The model.type
- One of EMPTY_VALUE_CHANGED
,
ENUM_VALUES_CHANGED
,
MIN_VALUE_CHANGED
,
MAX_VALUE_CHANGED
.column
- The affected column.oldValue
- The old value.newValue
- The new Value.public TreeListModelEvent(IlvTreeListModel source, TreeListModelEvent.Type type, int column, boolean oldValue, boolean newValue)
source
- The model.type
- One of ENUMERATED_CHANGED
.column
- The affected column.oldValue
- The old value.newValue
- The new Value.public IlvTreeListModel getModel()
public TreeListModelEvent.Type getType()
public Object getObject()
DATA_CHANGED
,
BEFORE_DATA_CHANGE
.public TreePath getObjectPath()
DATA_CHANGED
,
BEFORE_DATA_CHANGE
.public boolean isRecursive()
true
if the entire subtree is affected, not just a single object.
Assumes the event type is one of DATA_CHANGED
,
BEFORE_DATA_CHANGE
.public Object getParent()
null
for a root change.
Assumes the event type is one of OBJECTS_CHANGED
,
BEFORE_OBJECTS_REMOVED
, DURING_OBJECTS_REMOVED
.public TreePath getParentPath()
null
for a root change.
Assumes the event type is one of OBJECTS_CHANGED
,
BEFORE_OBJECTS_REMOVED
, DURING_OBJECTS_REMOVED
.public Object[] getOldObjects()
OBJECTS_CHANGED
,
BEFORE_OBJECTS_REMOVED
, DURING_OBJECTS_REMOVED
.public Object[] getNewObjects()
OBJECTS_CHANGED
.public int getFirstIndex()
OBJECTS_CHANGED
,
BEFORE_OBJECTS_REMOVED
, DURING_OBJECTS_REMOVED
.public int getColumn()
DATA_CHANGED
,
BEFORE_DATA_CHANGE
,
COLUMN_ADDED
, COLUMN_REMOVED
,
BEFORE_COLUMN_REMOVED
,
EMPTY_VALUE_CHANGED
, ENUMERATED_CHANGED
,
ENUM_VALUES_CHANGED
, MIN_VALUE_CHANGED
,
MAX_VALUE_CHANGED
.public IlvDataColumnInfo getColumnInfo()
null
for all columns.
Assumes the event type is one of DATA_CHANGED
,
BEFORE_DATA_CHANGE
,
COLUMN_ADDED
, COLUMN_REMOVED
,
BEFORE_COLUMN_REMOVED
,
EMPTY_VALUE_CHANGED
, ENUMERATED_CHANGED
,
ENUM_VALUES_CHANGED
, MIN_VALUE_CHANGED
,
MAX_VALUE_CHANGED
.public Object getOldValue()
IlvDataColumnInfo
.
Assumes the event type is one of EMPTY_VALUE_CHANGED
,
ENUMERATED_CHANGED
, ENUM_VALUES_CHANGED
,
MIN_VALUE_CHANGED
, MAX_VALUE_CHANGED
.public Object getNewValue()
IlvDataColumnInfo
.
Assumes the event type is one of EMPTY_VALUE_CHANGED
,
ENUMERATED_CHANGED
, ENUM_VALUES_CHANGED
,
MIN_VALUE_CHANGED
, MAX_VALUE_CHANGED
.public String toString()
String
representation of this event.toString
in class EventObject
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.