LibreOffice: XTreeDataModel Interface Reference

LibreOffice LibreOffice 26.2 SDK API Reference

Loading...
Searching...
No Matches
XTreeDataModel Interface Reference

An instance of this interface is used by the TreeControl to retrieve the hierarchical outline data that is displayed in the actual control. More...

`import "XTreeDataModel.idl";`

Inheritance diagram for XTreeDataModel:

## Public Member Functions
XTreeNode | getRoot ()
| Returns the root of the tree.
void | addTreeDataModelListener ([in] XTreeDataModelListener Listener)
| Adds a listener for the TreeDataModelEvent posted after the tree changes.
void | removeTreeDataModelListener ([in] XTreeDataModelListener Listener)
| Removes a listener previously added with addTreeDataModelListener().
Public Member Functions inherited from XComponent
void | dispose ()
| The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references.
void | addEventListener ([in] XEventListener xListener)
| adds an event listener to the object.
void | removeEventListener ([in] XEventListener aListener)
| removes an event listener from the listener list.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.

## Detailed Description

An instance of this interface is used by the TreeControl to retrieve the hierarchical outline data that is displayed in the actual control.

If you implement your own XTreeDataModel you need to notify registered XTreeDataModelListener if your model changes after the control is created. If this is not done correctly the TreeControl will not update the data properly.

If you do not need your own model implementation, you can also use the MutableTreeDataModel.

## Member Function Documentation

## ◆ addTreeDataModelListener()

void addTreeDataModelListener | ( | [in] XTreeDataModelListener | Listener | ) |

Adds a listener for the TreeDataModelEvent posted after the tree changes.

Parameters

  Listener | the listener to add.

## ◆ getRoot()

XTreeNode getRoot | ( |  | ) |

Returns the root of the tree.

Returns null only if the tree has no nodes.

Returns
  the root of the tree

## ◆ removeTreeDataModelListener()

void removeTreeDataModelListener | ( | [in] XTreeDataModelListener | Listener | ) |

Removes a listener previously added with addTreeDataModelListener().

Parameters

  Listener | the listener to remove.

The documentation for this interface was generated from the following file:

- com/sun/star/awt/tree/XTreeDataModel.idl