ooodev.adapter.awt.tree.tree_edit_listener module
- namedtuple ooodev.adapter.awt.tree.tree_edit_listener.NodeEditedArgs(node, new_text)[source]
Bases:
NamedTuple
Node Edit Args
- Fields:
node (
XTreeNode
) – Node being editednew_text (
str
) – New Text
- class ooodev.adapter.awt.tree.tree_edit_listener.TreeEditListener(trigger_args=None, subscriber=None)[source]
Bases:
AdapterBase
,XTreeEditListener
You can implement this interface and register with XTreeControl.addTreeEditListener() to get notifications when editing of a node starts and ends.
You have to set the TreeControlModel.Editable property to TRUE before a tree supports editing.
See also
- Parameters:
args (Any) –
kwargs (Any) –
- Return type:
Any
- __init__(trigger_args=None, subscriber=None)[source]
Constructor:
- Parameters:
trigger_args (GenericArgs, optional) – Args that are passed to events when they are triggered.
subscriber (XTreeControl, optional) – An UNO object that implements the
XTreeControl
interface. If passed in then this listener instance is automatically added to it.
- Return type:
None
- disposing(Source)[source]
Gets called when the broadcaster is about to be disposed.
All listeners and all other objects, which reference the broadcaster should release the reference to the source. No method should be invoked anymore on this object ( including
XComponent.removeEventListener()
).This method is called for every listener registration of derived listener interfaced, not only for registrations at
XComponent
.- Return type:
None
- Parameters:
Source (com.sun.star.lang.EventObject) –
- nodeEdited(Node, NewText)[source]
This method is called from the TreeControl implementation when editing of Node is finished and was not canceled.
Implementations that register a XTreeEditListener must update the display value at the Node.
Note
EventArgs.event_data
will contain aNodeEditedArgs
object.- Return type:
None
- Parameters:
Node (com.sun.star.awt.tree.XTreeNode) –
NewText (str) –