- Type Parameters:
N- the node type
- All Implemented Interfaces:
Serializable
TreeModelEvent.
- Author:
- Werner Randelshofer
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class java.util.EventObject
source -
Method Summary
Modifier and TypeMethodDescriptiongetChild()If a child was added or removed, returns the child.intIf the figure was added or removed, returns the child index.Returns the event type.@Nullable NIf the root has changed, returns the new root.getNode()The figure which was added, removed or of which a property changed.@Nullable NIf the root has changed, returns the old root.If a child was added or removed from a parent, returns the parent.getRoot()If a child was added or removed from a root, returns the root.static <E> TreeModelEvent<E> nodeAddedToParent(TreeModel<E> source, E child, E parent, int index) static <E> TreeModelEvent<E> nodeAddedToTree(TreeModel<E> source, E root, E node) static <E> TreeModelEvent<E> nodeChanged(TreeModel<E> source, E node) static <E> TreeModelEvent<E> nodeRemovedFromParent(TreeModel<E> source, E child, E parent, int index) static <E> TreeModelEvent<E> nodeRemovedFromTree(TreeModel<E> source, E root, E node) static <E> TreeModelEvent<E> rootChanged(TreeModel<E> source, @Nullable E oldRoot, @Nullable E newRoot) static <E> TreeModelEvent<E> subtreeNodesInvalidated(TreeModel<E> source, E subtreeRot) toString()
-
Method Details
-
subtreeNodesInvalidated
-
nodeAddedToParent
public static <E> TreeModelEvent<E> nodeAddedToParent(TreeModel<E> source, E child, E parent, int index) -
nodeRemovedFromParent
public static <E> TreeModelEvent<E> nodeRemovedFromParent(TreeModel<E> source, E child, E parent, int index) -
nodeAddedToTree
-
nodeRemovedFromTree
-
nodeChanged
-
rootChanged
public static <E> TreeModelEvent<E> rootChanged(TreeModel<E> source, @Nullable E oldRoot, @Nullable E newRoot) -
getOldRoot
If the root has changed, returns the old root. -
getNewRoot
If the root has changed, returns the new root. -
getNode
The figure which was added, removed or of which a property changed.- Returns:
- the figure
-
getParent
If a child was added or removed from a parent, returns the parent.- Returns:
- the parent
-
getRoot
If a child was added or removed from a root, returns the root.- Returns:
- the root
-
getChild
If a child was added or removed, returns the child.- Returns:
- the child
-
getChildIndex
public int getChildIndex()If the figure was added or removed, returns the child index.- Returns:
- an index. Returns -1 if the figure was neither added or removed.
-
getEventType
Returns the event type.- Returns:
- the event type
-
toString
- Overrides:
toStringin classEventObject
-