public interface

ITreeDocument

implements IGenericDocument IEventSource
com.pnfsoftware.jeb.core.output.tree.ITreeDocument
Known Indirect Subclasses

Class Overview

A tree document is used to represent hierarchical structures. Nodes of trees implement the INode interface. Tree document can be used to model simple trees as well as more complex table trees (see getColumnLabels()).

Summary

Public Methods
abstract INodeCoordinates addressToCoordinates(String address)
Convert a node address to node coordinates.
abstract String coordinatesToAddress(INodeCoordinates coordinates)
Convert node coordinates to an address understandable by the tree document and potentially the unit representing the document.
abstract List<String> getColumnLabels()
Provide column labels for table trees.
abstract int getInitialExpansionLevel()
Get the ideal expansion level of the tree.
abstract String getReferencedAddress(INode node)
Retrieve the address referenced by the INode.
abstract List<? extends INode> getRoots()
Get the list of tree roots.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.output.IGenericDocument
From interface com.pnfsoftware.jeb.util.events.IEventSource

Public Methods

public abstract INodeCoordinates addressToCoordinates (String address)

Convert a node address to node coordinates.

Note: The addressing scheme is unit specific, and defined by the plugin developer. Addresses should not start with the reserved '@' prefix.

Parameters
address the input address
Returns
  • the coordinates, null on error

public abstract String coordinatesToAddress (INodeCoordinates coordinates)

Convert node coordinates to an address understandable by the tree document and potentially the unit representing the document.

Note: The addressing scheme is unit specific, and defined by the plugin developer. Addresses should not start with the reserved '@' prefix.

Parameters
coordinates the node coordinates
Returns
  • the address, null on error

public abstract List<String> getColumnLabels ()

Provide column labels for table trees. A regular tree should return null.

Returns
  • the column labels, in practice at least two elements

public abstract int getInitialExpansionLevel ()

Get the ideal expansion level of the tree. Graphical clients should use this method when doing the initial rendering of a tree document.

Returns
  • the initial expansion level. Special values are: 0 to signify "expand nothing"; -1 to signify "expand all".

public abstract String getReferencedAddress (INode node)

Retrieve the address referenced by the INode. In trees, some leafs may reference another INode.

Parameters
node INode to test
Returns
  • the reference address (meaning the virtual content of the node) or null if not applicable.

public abstract List<? extends INode> getRoots ()

Get the list of tree roots.

Returns
  • the list of roots, cannot be null. Typically contain a single item, empty list at best