Package org.cytoscape.view.model
Class VisualLexiconNode
java.lang.Object
org.cytoscape.view.model.VisualLexiconNode
- All Implemented Interfaces:
Comparable<VisualLexiconNode>
A node in the visual property tree (lexicon).
Wrapping a VisualProperty and holding parent-child relationships.
All data fields are immutable.
Cytoscape Backwards Compatibility (Final Class): This class is final and therefore can't be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.
Module: viewmodel-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>viewmodel-api</artifactId> </dependency>
-
Constructor Summary
ConstructorDescriptionVisualLexiconNode
(VisualProperty<?> vp, VisualLexiconNode parent) Constructs this VisualLexiconNode. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(VisualLexiconNode other) Compare by display name of this Visual Property.Returns collection of all children of this node.Get the parent of this VP node.Returns wrapped VisualProperty object.void
visitDescendants
(Consumer<VisualLexiconNode> visitor) The given visitor function will be applied to this node and all its children recursively.
-
Constructor Details
-
VisualLexiconNode
Constructs this VisualLexiconNode.- Parameters:
vp
- theVisualProperty
to wrap.parent
- this VisualLexiconNodes parent VisualLexiconNode.
-
-
Method Details
-
getVisualProperty
Returns wrapped VisualProperty object. Since VisualProperty itself does not have any hierarchical structure, such relationship is implemented by this wrapper.- Returns:
- wrapped VisualProperty object.
-
getParent
Get the parent of this VP node. The relationship is immutable, i.e., cannot change parent/child relationship.- Returns:
- parent VisualProperty object.
-
getChildren
Returns collection of all children of this node.- Returns:
- collection of all children of this node.
-
compareTo
Compare by display name of this Visual Property.- Specified by:
compareTo
in interfaceComparable<VisualLexiconNode>
-
visitDescendants
The given visitor function will be applied to this node and all its children recursively.- Since:
- 3.8
-