public abstract class IlvHierarchyNodeChildEvent<N extends IlvHierarchyNode> extends EventObject
IlvHierarchyNodeChildEvent
is the superclass of all events that
are used to notify listeners when children have been inserted or removed
from a common parent node in a tree of nodes managed by an
IlvGanttModel
.
The child nodes must be siblings and direct descendents (not grandchildren)
of the specified parent node.IlvGanttModel
,
Serialized Formsource
Constructor and Description |
---|
IlvHierarchyNodeChildEvent(IlvGanttModel model,
N parent,
int[] childIndices)
Constructs a new
IlvHierarchyNodeChildEvent generated by the
specified data model that can be used to notify listeners
when child nodes have been inserted into a common parent. |
IlvHierarchyNodeChildEvent(IlvGanttModel model,
N parent,
List<? extends N> children)
Constructs a new
IlvHierarchyNodeChildEvent generated by the
specified data model that can be used to notify listeners
when child nodes have been inserted into a common parent. |
IlvHierarchyNodeChildEvent(IlvGanttModel model,
N parent,
List<? extends N> children,
int[] childIndices)
Constructs a new
IlvHierarchyNodeChildEvent generated by the
specified data model that can be used to notify listeners
when child nodes have been removed from a common parent. |
Modifier and Type | Method and Description |
---|---|
int[] |
getChildIndices()
Returns the indices of the child nodes.
|
IlvHierarchyNode[] |
getChildNodes()
Returns the array of child
IlvHierarchyNode 's that have been
inserted or removed. |
List<N> |
getChildren()
Returns the list of child
IlvHierarchyNode 's that have been
inserted or removed. |
IlvGanttModel |
getGanttModel()
Returns the data model where the event originated.
|
protected N |
getParent()
Returns the parent node which identifies the portion of the tree
hierarchy that has been modified.
|
getSource, toString
public IlvHierarchyNodeChildEvent(IlvGanttModel model, N parent, int[] childIndices)
IlvHierarchyNodeChildEvent
generated by the
specified data model that can be used to notify listeners
when child nodes have been inserted into a common parent. Note:
This constructor cannot be used to notify listeners when the root node
of the hierarchy has been inserted.model
- the data model where the event originatedparent
- the parent node which has had children insertedchildIndices
- an int
array that specifies the index
values of the inserted nodes. The indices represent the final
state of the node tree, after the inserts have occurred. The indices
do not have to be pre-sorted.public IlvHierarchyNodeChildEvent(IlvGanttModel model, N parent, List<? extends N> children)
IlvHierarchyNodeChildEvent
generated by the
specified data model that can be used to notify listeners
when child nodes have been inserted into a common parent.model
- the data model where the event originatedparent
- the parent node which has had children inserted. If the
insertion being reported is the hierarchy's root node, parent
should be null
and children
should be a
single element list containing the root node.children
- the list of child IlvHierarchyNode
's that have
been inserted. The nodes do not have to be presorted.public IlvHierarchyNodeChildEvent(IlvGanttModel model, N parent, List<? extends N> children, int[] childIndices)
IlvHierarchyNodeChildEvent
generated by the
specified data model that can be used to notify listeners
when child nodes have been removed from a common parent.model
- the data model where the event originatedparent
- the parent node which has had children removed. If the
deletion being reported is the hierarchy's root node, parent
should be null
, children
should be a
single element list containing the root node, and childIndices
should be a single element array with childIndices[0]=0
.children
- the list of child IlvHierarchyNode
's that have
been removed. The nodes do not have to be presorted, but must be
arranged in parallel with childIndices
. In other words,
childIndices[i]
must contain the index that node
(IlvHierarchyNode)children.get(i)
had before it was removed.childIndices
- an int
array that specifies the index
values that the child nodes had before they were removed. The indices
do not have to be presorted, but must be arranged in parallel with
children
.public IlvGanttModel getGanttModel()
IlvGanttModel
where the event originated.public int[] getChildIndices()
public List<N> getChildren()
IlvHierarchyNode
's that have been
inserted or removed. The nodes are ordered according to their
indices within their common parent node, arranged from lowest
to highest.List
of nodes that have been
inserted or removed.public IlvHierarchyNode[] getChildNodes()
IlvHierarchyNode
's that have been
inserted or removed. The nodes are ordered according to their
indices within their common parent node, arranged from lowest
to highest.protected final N getParent()
IlvHierarchyNode
.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.