public abstract class

AbstractTreeDocument

extends EventSource
implements ITreeDocument
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.events.EventSource
     ↳ com.pnfsoftware.jeb.core.output.tree.impl.AbstractTreeDocument
Known Direct Subclasses

Class Overview

An adapter for non-table trees. This class can be extended to serve as a base class for table trees as well, by overriding the getColumnLabels() method

The addressing system implemented in this adapter is trivial: it is a string representation of INodeCoordinates.

Example: coordinates: (0,10,4) -> address: "0,10,4"

Clients may also override dispose().

Summary

[Expand]
Inherited Fields
From class com.pnfsoftware.jeb.util.events.EventSource
Public Constructors
AbstractTreeDocument()
Public Methods
INodeCoordinates addressToCoordinates(String address)
Convert a node address to node coordinates.
String coordinatesToAddress(INodeCoordinates coordinates, Function<List<INode>, String> f)
Helper method to build address from coordinates
String coordinatesToAddress(INodeCoordinates coordinates)
Convert node coordinates to an address understandable by the tree document and potentially the unit representing the document.
void dispose()
The default implementation does nothing.
List<String> getColumnLabels()
Provide column labels for table trees.
int getInitialExpansionLevel()
Get the ideal expansion level of the tree.
IPropertyManager getPropertyManager()
The default implementation returns null.
[Expand]
Inherited Methods
From class com.pnfsoftware.jeb.util.events.EventSource
From class java.lang.Object
From interface com.pnfsoftware.jeb.core.output.IGenericDocument
From interface com.pnfsoftware.jeb.core.output.tree.ITreeDocument
From interface com.pnfsoftware.jeb.util.events.IEventSource

Public Constructors

public AbstractTreeDocument ()

Public Methods

public 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 String coordinatesToAddress (INodeCoordinates coordinates, Function<List<INode>, String> f)

Helper method to build address from coordinates

Parameters
coordinates INodeCoordinates
f function
  • argument: list of INode representing the INode path
  • result: String address
  • public 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 void dispose ()

    The default implementation does nothing.

    public 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 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 IPropertyManager getPropertyManager ()

    The default implementation returns null.

    Returns
    • a PM, null if none