Class StaticTreeDocument
java.lang.Object
com.pnfsoftware.jeb.util.events.EventSource
com.pnfsoftware.jeb.core.output.tree.impl.AbstractTreeDocument
com.pnfsoftware.jeb.core.output.tree.impl.StaticTreeDocument
- All Implemented Interfaces:
IGenericDocument
,ITreeDocument
,IEventSource
A simple tree document. Such tree document objects do not listen to unit changes events; in fact,
they are unaware of the
IUnit
family of classes. They are ideal to distribute static,
immutable contents.
Clients should not extend this class. Clients requiring custom tree documents should either
extend AbstractTreeDocument
or implement ITreeDocument
.
-
Field Summary
Fields inherited from class com.pnfsoftware.jeb.util.events.EventSource
onEventCallCount
-
Constructor Summary
ConstructorsConstructorDescriptionStaticTreeDocument
(INode root) StaticTreeDocument
(List<? extends INode> roots) StaticTreeDocument
(List<? extends INode> roots, List<String> columnLabels, int initialExpansionLevel) -
Method Summary
Modifier and TypeMethodDescriptionProvide column labels for table trees.int
Get the ideal expansion level of the tree.getRoots()
Get the list of tree roots.Methods inherited from class com.pnfsoftware.jeb.core.output.tree.impl.AbstractTreeDocument
addressToCoordinates, coordinatesToAddress, coordinatesToAddress, dispose, getPropertyManager
Methods inherited from class com.pnfsoftware.jeb.util.events.EventSource
addListener, countListeners, getListeners, getParentSource, insertListener, notifyListeners, notifyListeners, notifyListeners, relay, removeListener, setParentSource
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pnfsoftware.jeb.util.events.IEventSource
addListener, countListeners, getListeners, getParentSource, insertListener, notifyListeners, removeListener, setParentSource
Methods inherited from interface com.pnfsoftware.jeb.core.output.IGenericDocument
getUnit
Methods inherited from interface com.pnfsoftware.jeb.core.output.tree.ITreeDocument
getReferencedAddress
-
Constructor Details
-
StaticTreeDocument
-
StaticTreeDocument
-
StaticTreeDocument
-
-
Method Details
-
getRoots
Description copied from interface:ITreeDocument
Get the list of tree roots.- Returns:
- the list of roots, cannot be null. Typically contain a single item, empty list at best
-
getColumnLabels
Description copied from interface:ITreeDocument
Provide column labels for table trees. A regular tree should return null.- Specified by:
getColumnLabels
in interfaceITreeDocument
- Overrides:
getColumnLabels
in classAbstractTreeDocument
- Returns:
- the column labels, in practice at least two elements
-
getInitialExpansionLevel
public int getInitialExpansionLevel()Description copied from interface:ITreeDocument
Get the ideal expansion level of the tree. Graphical clients should use this method when doing the initial rendering of a tree document.- Specified by:
getInitialExpansionLevel
in interfaceITreeDocument
- Overrides:
getInitialExpansionLevel
in classAbstractTreeDocument
- Returns:
- the initial expansion level. Special values are: 0 to signify "expand nothing"; -1 to signify "expand all".
-