- Type Parameters:
N- the node type
- All Superinterfaces:
javafx.beans.Observable,ObservableMixin
- All Known Implementing Classes:
AbstractTreeModel,SimpleTreeModel
TreeModel.
- Author:
- Werner Randelshofer
-
Property Summary
Properties -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddChildTo(N child, N parent) Adds the specified child to a parent and fires appropriateTreeModelEvent<E>s.default voidAdds a listener forTreeModelEvent<E>s.default voidfireNodeInvalidated(N node) Fires "node invalidated" event for the specified node.default voidfireTreeModelEvent(TreeModelEvent<N> event) Fires the specified event.Gets the child at the given index from the parent.intgetChildCount(N node) Gets the child count of the specified figure.getChildren(N node) Gets the children of the specified node.CopyOnWriteArrayList<javafx.beans.InvalidationListener> List of invalidation listeners.default @Nullable NgetRoot()Gets the root of the tree.List of drawing model listeners.voidinsertChildAt(N child, N parent, int index) Adds the specified child to a parent and fires appropriateTreeModelEvent<E>s.voidremoveFromParent(N child) Removes the specified child from its parent and fires appropriateTreeModelEvent<E>s.default voidRemoves a listener forTreeModelEvent<E>s.javafx.beans.property.ObjectProperty<N> The root of the drawing model.default voidSets the root of the tree and fires appropriateTreeModelEvent<E>s.Methods inherited from interface javafx.beans.Observable
subscribeMethods inherited from interface org.jhotdraw8.fxbase.beans.ObservableMixin
addListener, fireInvalidated, fireInvalidated, invalidated, removeListener
-
Property Details
-
root
javafx.beans.property.ObjectProperty<N> rootPropertyThe root of the drawing model.- See Also:
-
-
Field Details
-
ROOT_PROPERTY
Name of the root property.- See Also:
-
-
Method Details
-
getTreeModelListeners
CopyOnWriteArrayList<Listener<TreeModelEvent<N>>> getTreeModelListeners()List of drawing model listeners.- Returns:
- a list of drawing model listeners
-
getInvalidationListeners
CopyOnWriteArrayList<javafx.beans.InvalidationListener> getInvalidationListeners()List of invalidation listeners.- Specified by:
getInvalidationListenersin interfaceObservableMixin- Returns:
- a list of drawing model listeners
-
rootProperty
javafx.beans.property.ObjectProperty<N> rootProperty()The root of the drawing model.- Returns:
- the root
- See Also:
-
addTreeModelListener
Adds a listener forTreeModelEvent<E>s.- Parameters:
l- the listener
-
removeTreeModelListener
Removes a listener forTreeModelEvent<E>s.- Parameters:
l- the listener
-
getRoot
Gets the root of the tree.- Returns:
- the drawing
-
setRoot
Sets the root of the tree and fires appropriateTreeModelEvent<E>s.- Parameters:
root- the new root
-
getChildren
Gets the children of the specified node.- Parameters:
node- the node.- Returns:
- the getChildren.
-
getChildCount
Gets the child count of the specified figure.- Parameters:
node- the parent.- Returns:
- the number of getChildren
-
getChild
Gets the child at the given index from the parent.- Parameters:
parent- the parent.index- the index.- Returns:
- the child
-
removeFromParent
Removes the specified child from its parent and fires appropriateTreeModelEvent<E>s.- Parameters:
child- the child
-
insertChildAt
Adds the specified child to a parent and fires appropriateTreeModelEvent<E>s.- Parameters:
child- the new childparent- the parent.index- the index
-
addChildTo
Adds the specified child to a parent and fires appropriateTreeModelEvent<E>s.- Parameters:
child- the new childparent- the parent.
-
fireTreeModelEvent
Fires the specified event.- Parameters:
event- the event
-
fireNodeInvalidated
Fires "node invalidated" event for the specified node.- Parameters:
node- the node
-