Class StaticTreeDocument

All Implemented Interfaces:
IGenericDocument, ITreeDocument, IEventSource

@Ser public class StaticTreeDocument extends AbstractTreeDocument
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.

  • Constructor Details

    • StaticTreeDocument

      public StaticTreeDocument(INode root)
    • StaticTreeDocument

      public StaticTreeDocument(List<? extends INode> roots)
    • StaticTreeDocument

      public StaticTreeDocument(List<? extends INode> roots, List<String> columnLabels, int initialExpansionLevel)
  • Method Details

    • getRoots

      public List<? extends INode> 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

      public List<String> getColumnLabels()
      Description copied from interface: ITreeDocument
      Provide column labels for table trees. A regular tree should return null.
      Specified by:
      getColumnLabels in interface ITreeDocument
      Overrides:
      getColumnLabels in class AbstractTreeDocument
      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 interface ITreeDocument
      Overrides:
      getInitialExpansionLevel in class AbstractTreeDocument
      Returns:
      the initial expansion level. Special values are: 0 to signify "expand nothing"; -1 to signify "expand all".