Inherits from
- TreeModel: enthought.pyface.tree.tree_model.TreeModel
Attributes
- node_manager
The node manager looks after all node types.
node_manager = Instance(NodeManager, ())
Inherited from base classes
Method summary
- add_listener(self, node)
- can_drop(self, node, data)
- can_set_text(self, node, text)
- drop(self, node, data)
- get_children(self, node)
- get_context_menu(self, node)
- get_default_action(self, node)
- get_drag_value(self, node)
- get_image(self, node, selected, expanded)
- get_key(self, node)
- get_selection_value(self, node)
- get_text(self, node)
- has_children(self, node)
- is_collapsible(self, node)
- is_draggable(self, node)
- is_editable(self, node)
- is_expandable(self, node)
- remove_listener(self, node)
- set_text(self, node, text)
Inherited from base classes
- fire_nodes_changed(self, node, children)
- fire_nodes_inserted(self, node, children)
- fire_nodes_removed(self, parent, children)
- fire_nodes_replaced(self, node, old_children, new_children)
- fire_structure_changed(self, node)
Methods
- add_listener(self, node)
Adds a listener for changes to a node.
- can_drop(self, node, data)
Returns True if a node allows an object to be dropped onto it.
- can_set_text(self, node, text)
Returns True if the node's label can be set.
- drop(self, node, data)
Drops an object onto a node.
- get_children(self, node)
Returns the children of a node.
- get_default_action(self, node)
Returns the default action for a node.
- get_drag_value(self, node)
Get the value that is dragged for a node.
By default the drag value is the node itself.
- get_image(self, node, selected, expanded)
Returns the label image for a node.
Return None (the default) if no image is required.
- get_key(self, node)
Generate a unique key for a node.
- get_selection_value(self, node)
Get the value that is used when a node is selected.
By default the selection value is the node itself.
- get_text(self, node)
Returns the label text for a node.
Return None if no text is required. By default we return 'str(node)'.
- has_children(self, node)
Returns True if a node has children, otherwise False.
This method is provided in case the model has an efficient way to determine whether or not a node has any children without having to actually get the children themselves.
- is_collapsible(self, node)
Returns True if the node is collapsible, otherwise False.
- is_draggable(self, node)
Returns True if the node is draggable, otherwise False.
- is_editable(self, node)
Returns True if the node is editable, otherwise False.
If the node is editable, its text can be set via the UI.
- is_expandable(self, node)
Returns True if the node is expandanble, otherwise False.
- remove_listener(self, node)
Removes a listener for changes to a node.
- set_text(self, node, text)
Sets the label text for a node.