Inherits from
- HasPrivateTraits: enthought.traits.has_traits.HasPrivateTraits
Attributes
- actions
The default actions/groups/menus available on nodes of this type (shown on the context menu).
actions = Any
- CLOSED_FOLDER
The default image used to represent nodes that allow children and are NOT expanded.
CLOSED_FOLDER = ImageResource('closed_folder')
- closed_image
The image used to represent nodes that allow children and are NOT expanded.
closed_image = Instance(ImageResource)
- default_action
The default action for nodes of this type. The default action is performed when a node is activated (i.e., double-clicked).
default_action = Instance(Action)
- DOCUMENT
The default image used to represent nodes that DO NOT allow children.
DOCUMENT = ImageResource('document')
- image
The image used to represent nodes that DO NOT allow children.
image = Instance(ImageResource)
- new_actions
The default actions/groups/menus for creating new children within nodes of this type (shown in the 'New' menu of the context menu).
new_actions = Any
- node_manager
The node manager that the type belongs to.
node_manager = Instance('enthought.pyface.tree.node_manager.NodeManager')
- OPEN_FOLDER
The default image used to represent nodes that allow children and ARE expanded.
OPEN_FOLDER = ImageResource('open_folder')
- open_image
The image used to represent nodes that allow children and ARE expanded.
open_image = Instance(ImageResource)
Inherited from base classes
Method summary
- allows_children(self, node)
- can_drop(self, node, data)
- can_rename(self, node)
- can_set_text(self, node, text)
- drop(self, obj, data)
- get_actions(self, node)
- get_children(self, node)
- get_context_menu(self, node)
- get_copy_value(self, node)
- get_default_action(self, node)
- get_drag_value(self, node)
- get_image(self, node, selected, expanded)
- get_monitor(self, node)
- get_new_actions(self, node)
- get_paste_value(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)
- is_type_for(self, node)
- set_text(self, node, text)
Inherited from base classes
- __deepcopy__(self, memo)
- __getstate__(self)
- __prefix_trait__(self, name, is_set)
- __reduce_ex__(self, protocol)
- __setstate__(self, state, trait_change_notify = True)
- add_class_trait(cls, name, *trait)
- add_trait(self, name, *trait)
- add_trait_category(cls, category)
- add_trait_listener(self, object, prefix = '')
- all_trait_names(self)
- base_trait(self, name)
- class_default_traits_view(cls)
- class_editable_traits(cls)
- class_trait_names(cls, **metadata)
- class_trait_view(cls, name = None, view_element = None)
- class_trait_view_elements(cls)
- class_traits(cls, **metadata)
- clone_traits(self, traits = None, memo = None, copy = None, **metadata)
- configure_traits(self, filename = None, view = None, kind = None, edit = True, context = None, handler = None, id = '', scrollable = None, **args)
- copy_traits(self, other, traits = None, memo = None, copy = None, **metadata)
- copyable_trait_names(self, **metadata)
- default_traits_view(self)
- edit_traits(self, view = None, parent = None, kind = None, context = None, handler = None, id = '', scrollable = None, **args)
- editable_traits(self)
- has_traits_interface(self, *interfaces)
- on_trait_change(self, handler, name = None, remove = False, dispatch = 'same', priority = False, deferred = False)
- print_traits(self, show_help = False, **metadata)
- remove_trait(self, name)
- remove_trait_listener(self, object, prefix = '')
- reset_traits(self, traits = None, **metadata)
- set_trait_dispatch_handler(cls, name, klass, override = False)
- sync_trait(self, trait_name, object, alias = None, mutual = True, remove = False)
- trait(self, name, force = False, copy = False)
- trait_context(self)
- trait_get(self, *names, **metadata)
- trait_monitor(cls, handler, remove = False)
- trait_names(self, **metadata)
- trait_set(self, trait_change_notify = True, **traits)
- trait_setq(self, **traits)
- trait_subclasses(cls, all = False)
- trait_view(self, name = None, view_element = None)
- trait_view_elements(self)
- trait_views(self, klass = None)
- traits(self, **metadata)
- validate_trait(self, name, value)
Methods
- allows_children(self, node)
Does the node allow children (ie. a folder vs a file).
- can_drop(self, node, data)
Returns True if a node allows an object to be dropped onto it.
- can_rename(self, node)
Returns True if the node can be renamed, otherwise False.
- can_set_text(self, node, text)
Returns True if the node's label can be set.
- drop(self, obj, data)
Drops an object onto a node.
- get_actions(self, node)
Returns the node-specific actions for a node.
- get_children(self, node)
Returns the children of a node.
You only need to implement this method if children are allowed for the node.
- get_copy_value(self, node)
Get the value that is copied for a node.
By default, returns the node itself.
- 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, returns the node itself.
- get_image(self, node, selected, expanded)
Returns the label image for a node.
- get_monitor(self, node)
Returns a monitor that detects changes to a node.
Returns None by default, which indicates that the node is not monitored.
- get_new_actions(self, node)
Returns the new actions for a node.
- get_paste_value(self, node)
Get the value that is pasted for a node.
By default, returns the node itself.
- 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.
- has_children(self, node)
Returns True if a node has children, otherwise False.
You only need to implement this method if children are allowed for the node (ie. 'allows_children' returns True).
- is_collapsible(self, node)
Returns True if the node is collapsible, otherwise False.
- is_draggable(self, node)
Returns True if the node is draggablee, 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.
DEPRECATED: Use 'can_rename'.
- is_expandable(self, node)
Returns True if the node is expandanble, otherwise False.
- is_type_for(self, node)
Returns True if a node is deemed to be of this type.
- set_text(self, node, text)
Sets the label text for a node.