Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: awt :: tree ::

interface XTreeDataModel
Base Interfaces
XTreeDataModel
┗ ::com::sun::star::lang::XComponent

::com::sun::star::lang::XComponent
(referenced interface's summary:)
allows to exclicitly free resources and break cyclic references.
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.

Methods' Summary
getRoot Returns the root of the tree.  
addTreeDataModelListener Adds a listener for the TreeDataModelEvent posted after the tree changes.  
removeTreeDataModelListener Removes a listener previously added with addTreeDataModelListener().  
Methods' Details
getRoot
XTreeNode
getRoot();

Description
Returns the root of the tree.

Returns null only if the tree has no nodes.

Returns
the root of the tree
addTreeDataModelListener
void
addTreeDataModelListener( [in] XTreeDataModelListener  Listener );

Description
Adds a listener for the TreeDataModelEvent posted after the tree changes.
Parameter Listener
the listener to add.
removeTreeDataModelListener
void
removeTreeDataModelListener( [in] XTreeDataModelListener  Listener );

Description
Removes a listener previously added with addTreeDataModelListener().
Parameter Listener
the listener to remove.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.