Class Node

Superclasses :
util::SetFields
lang::Object
Subclasses :
gui::TreeTableNode
Package :
gui

This class represents a node in a Tree object.

Source

Class summary
Methods inherited from util::SetFields
as_attrib(attr, val) attrib(a[]) cset_val(attr, val) field_error(s) int_val(attr, val) int_vals(attr, val, n) numeric_val(attr, val) numeric_vals(attr, val, n) set_fields(l) string_val(attr, val) string_vals(attr, val, n) test_flag(attr, val)
Methods inherited from lang::Object
clone(seen) equals(other, seen) get_class() get_class_name() get_id() hash_code(depth, seen) is_instance(name) to_string(depth, seen)
Methods defined in this class
add(n) clear_always_expandable() clear_children() delete_node(n) expand() generate_all_postorder() generate_all_preorder() generate_open_postorder() generate_open_preorder() get_children() get_label() get_parent_node() initially() is_expanded() set_always_expandable() set_bmps(x) set_label(x) set_one(attr, val) toggle_expanded()
Variables defined in this class
always_expandable_flag bmps depth draw_line is_expanded_flag label parent_node subnodes

Method detail

add(n)

Add the given Node to this Node's list of subnodes.
Parameters :
The - Node to add.
Source

clear_always_expandable()

This turns off the always_expandable feature (the default).
Source

clear_children()

Clear all the subnodes
Source

delete_node(n)

Delete the given Node from the subnodes.
Source

expand()

Expand all the Nodes below this node.
Source

generate_all_postorder()

Generate all the Nodes in this subtree, including this Node, in postorder ordering.
Source

generate_all_preorder()

Generate all the Nodes in this subtree, including this Node, in preorder ordering.
Source

generate_open_postorder()

Generate all open Nodes in this subtree, including this Node, in postorder ordering.
Source

generate_open_preorder()

Generate all the open Nodes in this subtree, including this Node, in preorder ordering.
Source

get_children()

Get the child nodes
Source

get_label()

Return the label
Source

get_parent_node()

Get the parent node, or fail if there is none.
Source

initially()


is_expanded()

Succeed iff the node is opened
Source

set_always_expandable()

This configures the Node so that it is always treated as though it has subnodes for display purposes, event though it may in fact have no subnodes.
Source

set_bmps(x)

Set the bitmaps for this node. The parameter should provide a list of 3 bitmaps. The first is displayed if the Node is open and has subnodes, the second is displayed if the Node is closed and has subnodes, and the third is displayed if the node has no subnodes.
Parameters :
x - A list of 3 bitmaps.
Source

set_label(x)

Set the label for this node.
Source

set_one(attr, val)

Overrides set_one(attr, val) in util::SetFields
Source

toggle_expanded()

Toggle the opened status of the Node.
Source

Variable detail

always_expandable_flag


bmps


depth


draw_line


is_expanded_flag


label


parent_node


subnodes