Interface for all tree implementations. This tree class provides default implementations of its methods for example and basic usage. The implementation provided outputs a nested tree using the UL and LI html elements.
| Operations Summary: | |
| __init__(self, page) A tree is a strategy, so it must be passed the page instance to display to. [Source] | |
| startTree(self) Writes anything to the file that needs to be written at the start. [Source] | |
| endTree(self) Writes anything that needs to be written at the end. [Source] | |
| writeLeaf(self, text) Writes a leaf to the output. [Source] | |
| writeNodeStart(self, text) Starts a node with children. [Source] | |
| writeNodeEnd(self) Ends a node with children. [Source] | |
| Operation Details: |
Writes anything to the file that needs to be written at the start. For example a script section for the global scripts used by a javascript tree.
Writes a leaf to the output. A leaf is a node with no children, for example a module (not package) or a file (not directory). The text is output verbatim in the appropriate html tags, which in the default instance is LI
Starts a node with children. The text is written, and then a block of children is started. This method call must be followed by a corresponding writeNodeEnd() call. Invididual leaves inside the block may be written out using the writeLeaf() method.
Ends a node with children. This method just closes any tags opened by the corresponding writeNodeStart() method for a node.