Inherits from
- NodeType: enthought.pyface.tree.node_type.NodeType
Attributes
- action_location_root
If set, then we build our context menu by querying for actions, groups, and menus, within ActionSets, which are configured for locations starting with this path. In that case, this value must be an exact match to the begining of the fully-expanded location string -- it should NOT include an alias.
action_location_root = Str
- action_set_type
The extension point we retrieve our action sets from.
This is used only to filter the menu building algorithm to a smaller set of possible actions to consider. Overriding it is NOT required unless you're app is suffering from performance issues when building context menus.
action_set_type = Type(ActionSet)
- resource_type
The resource type that we are the node type for.
resource_type = Instance('enthought.envisage.resource.ResourceType')
- use_system_actions
Should the system actions be added to the context menu.
fixme: THis is here so that we can use system actions in VMS without stomping on other projects. In the future this should be the default behaviour (or at least some kind of system action framework needs to be put in place).
use_system_actions = Bool(False)
Inherited from base classes
Method summary
- allows_children(self, node)
- can_copy(self, node)
- can_cut(self, node)
- can_delete(self, node)
- can_paste(self, node, data)
- can_rename(self, node)
- can_set_text(self, node, text)
- confirm_delete(self, node)
- get_children(self, node)
- get_confirm_delete_message(self, node)
- get_context_menu(self, node)
- get_context_menu_template(self, node)
- get_copy_value(self, node)
- get_drag_value(self, node)
- get_monitor(self, node)
- get_paste_value(self, node)
- get_text(self, node)
- has_children(self, node)
- is_type_for(self, node)
- paste(self, node, data)
- set_text(self, node, text)
Inherited from base classes
- __deepcopy__(self, memo)
- __getstate__(self)
- __prefix_trait__(self, name)
- __reduce_ex__(self, protocol)
- __setstate__(self, state)
- 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)
- can_drop(self, node, data)
- 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)
- drop(self, obj, data)
- edit_traits(self, view = None, parent = None, kind = None, context = None, handler = None, id = '', scrollable = None, **args)
- editable_traits(self)
- get(self, *names, **metadata)
- get_actions(self, node)
- get_default_action(self, node)
- get_image(self, node, selected, expanded)
- get_new_actions(self, node)
- get_selection_value(self, node)
- is_collapsible(self, node)
- is_draggable(self, node)
- is_editable(self, node)
- is_expandable(self, node)
- on_trait_change(self, handler, name = None, remove = False, dispatch = 'same')
- print_traits(self, show_help = False, **metadata)
- remove_trait(self, name)
- remove_trait_listener(self, object, prefix = '')
- reset_traits(self, traits = None, **metadata)
- set(self, trait_change_notify = True, **traits)
- 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_monitor(cls, handler, remove = False)
- trait_names(self, **metadata)
- 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_copy(self, node)
Can a node be copied?
- can_cut(self, node)
Can a node be cut?
- can_delete(self, node)
Can a node be deleted?
- can_paste(self, node, data)
Returns True iff an object can be pasted into a node.
- 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.
- confirm_delete(self, node)
Returns True if deletions must be confirmed.
- get_children(self, node)
Returns the children of a node.
- get_confirm_delete_message(self, node)
Returns the message displayed when confirming deletion.
- get_copy_value(self, node)
Get the value that is copied for a node.
By default, returns the node itself.
- get_drag_value(self, node)
Get the value that is dragged 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_paste_value(self, node)
Get the value that is pasted for a node.
- get_text(self, node)
Returns the label text for a node.
- has_children(self, node)
Returns True if a node has children, otherwise False.
- is_type_for(self, node)
Returns True if a node is deemed to be of this type.
- paste(self, node, data)
- set_text(self, node, text)
Sets the label text for a node.