Modules | Files | Inheritance Tree | Inheritance Graph | Name Index | Config
module Synopsis::Formatter::HTML::TreeFormatterJS
class TreeFormatterJS
Files: Synopsis/Formatter/HTML/TreeFormatterJS.py
TreeFormatterJS-inheritance

Javascript trees. The trees have expanding and collapsing nodes. call js_init() with the button images and default open/close policy during process


Operations Summary:
 __init__(self, page) [Source]
 getId(self) [Source]
 js_init(self, open_img, close_img, leaf_img, base, default_open = 1)
Initialise the JSTree page. [Source]
 startTree(self)
Writes the javascript [Source]
 formatImage(self, id, filename, alt_text = "")
Returns the image element for the given image [Source]
 writeLeaf(self, item_text)
Write a leaf node to the output at the current tree level. [Source]
 writeNodeStart(self, item_text)
Write a non-leaf node to the output at the current tree level, and start a new level. [Source]
 writeNodeEnd(self)
Finish a non-leaf node, and close the current tree level. [Source]
 endTree(self)
Writes the end of the tree. [Source]

Operation Details:
  js_init(self, open_img, close_img, leaf_img, base, default_open = 1)

Initialise the JSTree page. This method copies the files to the output directory and stores the values given.

Parameters:
open_img - filename of original open image
close_img - filename of original close image
base - filename with a %s for open/close images, eg "tree_%s.png"
default_open - true if sections are open by default