|
LibreOffice
LibreOffice 24.8 SDK API Reference
|
An interface to a control that displays a set of hierarchical data as an outline. More...
import "XTreeControl.idl";
Exported Interfaces | |
| interface | ::com::sun::star::view::XMultiSelectionSupplier |
| This interfaces provides access to the selection of tree nodes for this control. | |
Public Member Functions | |
| boolean | isNodeExpanded ([in] XTreeNode Node) raises ( ::com::sun::star::lang::IllegalArgumentException ) |
| Returns TRUE if Node is currently expanded. | |
| boolean | isNodeCollapsed ([in] XTreeNode Node) raises ( ::com::sun::star::lang::IllegalArgumentException ) |
| Returns TRUE if Node is currently collapsed. | |
| void | makeNodeVisible ([in] XTreeNode Node) raises ( com::sun::star::lang::IllegalArgumentException, ExpandVetoException ) |
| Ensures that Node is currently visible. | |
| boolean | isNodeVisible ([in] XTreeNode Node) raises ( com::sun::star::lang::IllegalArgumentException ) |
| Returns TRUE if Node is currently visible. | |
| void | expandNode ([in] XTreeNode Node) raises ( com::sun::star::lang::IllegalArgumentException, ExpandVetoException ) |
| Ensures that Node is expanded and visible. | |
| void | collapseNode ([in] XTreeNode Node) raises ( com::sun::star::lang::IllegalArgumentException, ExpandVetoException ) |
| Ensures that Node is collapsed. | |
| void | addTreeExpansionListener ([in] XTreeExpansionListener Listener) |
| Adds a listener for TreeExpansion events. | |
| void | removeTreeExpansionListener ([in] XTreeExpansionListener Listener) |
| Removes a listener for TreeExpansion events. | |
| XTreeNode | getNodeForLocation ([in] long x, [in] long y) |
| Returns the node at the specified location. | |
| XTreeNode | getClosestNodeForLocation ([in] long x, [in] long y) |
| Returns the node that is closest to x,y. | |
| ::com::sun::star::awt::Rectangle | getNodeRect ([in] XTreeNode Node) raises ( ::com::sun::star::lang::IllegalArgumentException ) |
| returns the rectangle occupied by the visual representation of the given node | |
| boolean | isEditing () |
| Returns TRUE if one of tree's nodes is being currently edited. | |
| boolean | stopEditing () |
| Ends the current editing session. | |
| void | cancelEditing () |
| Cancels the current editing session. | |
| void | startEditingAtNode ([in] XTreeNode Node) raises ( ::com::sun::star::lang::IllegalArgumentException ) |
| Selects Node and initiates editing. | |
| void | addTreeEditListener ([in] XTreeEditListener Listener) |
| Adds a XTreeEditListener. | |
| void | removeTreeEditListener ([in] XTreeEditListener Listener) |
| Removes a XTreeEditListener. | |
| Public Member Functions inherited from XMultiSelectionSupplier | |
| boolean | addSelection ([in] any Selection) raises ( com::sun::star::lang::IllegalArgumentException ) |
| adds the object or the objects represented by Selection to the selection of this XMultiSelectionSupplier. | |
| void | removeSelection ([in] any Selection) raises ( com::sun::star::lang::IllegalArgumentException ) |
| remove the object or objects represented by Selection from the selection of this XMultiSelectionSupplier. | |
| void | clearSelection () |
| clears the selection of this XMultiSelectionSupplier. | |
| long | getSelectionCount () |
| returns the number of selected objects of this XMultiSelectionSupplier. | |
| com::sun::star::container::XEnumeration | createSelectionEnumeration () |
| com::sun::star::container::XEnumeration | createReverseSelectionEnumeration () |
| Public Member Functions inherited from XSelectionSupplier | |
| boolean | select ([in] any xSelection) raises ( com::sun::star::lang::IllegalArgumentException ) |
| selects the object represented by xSelection if it is known and selectable in this object. | |
| any | getSelection () |
| void | addSelectionChangeListener ([in] com::sun::star::view::XSelectionChangeListener xListener) |
| registers an event listener, which is called when the selection changes. | |
| void | removeSelectionChangeListener ([in] com::sun::star::view::XSelectionChangeListener xListener) |
| unregisters an event listener which was registered with XSelectionSupplier::addSelectionChangeListener(). | |
| 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. | |
Public Attributes | |
| string | DefaultExpandedGraphicURL |
| If the given URL points to a loadable graphic, the graphic is rendered before expanded non leaf nodes. | |
| string | DefaultCollapsedGraphicURL |
| If the given URL points to a loadable graphic, the graphic is rendered before collapsed non leaf nodes. | |
An interface to a control that displays a set of hierarchical data as an outline.
This interfaces provides access to the selection of tree nodes for this control.
valid selection values for this interface are XTreeNode or sequence<XTreeNode>.
com::sun::star::view::XSelectionSupplier::getSelection() returns an empty any for no selection, an any with XTreeNode for a single selection and a sequence<XTreeNode> for a multiselection.
| void addTreeEditListener | ( | [in] XTreeEditListener | Listener | ) |
Adds a XTreeEditListener.
| Listener | a XTreeEditListener that will be notified before and after a tree node is edited. |
| void addTreeExpansionListener | ( | [in] XTreeExpansionListener | Listener | ) |
Adds a listener for TreeExpansion events.
| Listener | a XTreeExpansionListener that will be notified when a tree node is expanded or collapsed. |
| void cancelEditing | ( | ) |
Cancels the current editing session.
Has no effect if the tree isn't being edited.
| void collapseNode | ( | [in] XTreeNode | Node | ) | ||
| raises | ( | com::sun::star::lang::IllegalArgumentException, | ||||
| ExpandVetoException ) | ||||||
Ensures that Node is collapsed.
| Node | the XTreeNode identifying a node |
| com::sun::star::lang::IllegalArgumentException | if Node is not a valid node of the corresponding XTreeDataModel. |
| ExpandVetoException | if collapsing Node failed because at least one of the registered XTreeExpansionListener raised an ExpandVetoException. |
| void expandNode | ( | [in] XTreeNode | Node | ) | ||
| raises | ( | com::sun::star::lang::IllegalArgumentException, | ||||
| ExpandVetoException ) | ||||||
Ensures that Node is expanded and visible.
If Node is a leaf node, this will have no effect.
| Node | the XTreeNode identifying a node. |
| com::sun::star::lang::IllegalArgumentException | if Node is not a valid node of the corresponding XTreeDataModel. |
| ExpandVetoException | if expanding Node failed because at least one of the registered XTreeExpansionListener raised an ExpandVetoException. |
| XTreeNode getClosestNodeForLocation | ( | [in] long | x, |
| [in] long | y ) |
Returns the node that is closest to x,y.
If no nodes are currently viewable, or there is no model, returns null, otherwise it always returns a valid node. To test if the node is exactly at x, y, use getNodeForLocation().
| x | an integer giving the number of pixels horizontally from the left edge of the controls display area |
| y | an integer giving the number of pixels vertically from the top edge of the controls display area |
| XTreeNode getNodeForLocation | ( | [in] long | x, |
| [in] long | y ) |
Returns the node at the specified location.
| x | an integer giving the number of pixels horizontally from the left edge of the controls display area |
| y | an integer giving the number of pixels vertically from the top edge of the controls display area |
| ::com::sun::star::awt::Rectangle getNodeRect | ( | [in] XTreeNode | Node | ) | ||
| raises | ( | ::com::sun::star::lang::IllegalArgumentException ) | ||||
returns the rectangle occupied by the visual representation of the given node
| Node | the node whose geometry should be obtained |
| com::sun::star::lang::IllegalArgumentException | if the given node is NULL, or does not belong to the tree's data model |
| boolean isEditing | ( | ) |
Returns TRUE if one of tree's nodes is being currently edited.
The node that is being edited can be obtained using com::sun::star::view::XSelectionSupplier::getSelection().
| boolean isNodeCollapsed | ( | [in] XTreeNode | Node | ) | ||
| raises | ( | ::com::sun::star::lang::IllegalArgumentException ) | ||||
Returns TRUE if Node is currently collapsed.
| Node | the XTreeNode specifying the node to check |
| com::sun::star::lang::IllegalArgumentException | if Node is not a valid node of the corresponding XTreeDataModel. |
| boolean isNodeExpanded | ( | [in] XTreeNode | Node | ) | ||
| raises | ( | ::com::sun::star::lang::IllegalArgumentException ) | ||||
Returns TRUE if Node is currently expanded.
| Node | the XTreeNode specifying the node to check. |
| com::sun::star::lang::IllegalArgumentException | if Node is not a valid node of the corresponding XTreeDataModel. |
| boolean isNodeVisible | ( | [in] XTreeNode | Node | ) | ||
| raises | ( | com::sun::star::lang::IllegalArgumentException ) | ||||
Returns TRUE if Node is currently visible.
Visible means it is either the root or all of its parents are expanded.
| com::sun::star::lang::IllegalArgumentException | if Node is not a valid node of the corresponding XTreeDataModel. |
| void makeNodeVisible | ( | [in] XTreeNode | Node | ) | ||
| raises | ( | com::sun::star::lang::IllegalArgumentException, | ||||
| ExpandVetoException ) | ||||||
Ensures that Node is currently visible.
This includes expanding all parent nodes and scroll the control so this node is visible in the controls display area.
| Node | the XTreeNode specifying the node to make visible. |
| com::sun::star::lang::IllegalArgumentException | if Node is not a valid node of the corresponding XTreeDataModel. |
| ExpandVetoException | if Nodecan't be made visible since at least one of the parent nodes are collapsed and expanding failed because at least one of the registered XTreeExpansionListener raised an ExpandVetoException. |
| void removeTreeEditListener | ( | [in] XTreeEditListener | Listener | ) |
Removes a XTreeEditListener.
| Listener | the XTreeEditListener to remove |
| void removeTreeExpansionListener | ( | [in] XTreeExpansionListener | Listener | ) |
Removes a listener for TreeExpansion events.
| Listener | the XTreeExpansionListener to remove. |
| void startEditingAtNode | ( | [in] XTreeNode | Node | ) | ||
| raises | ( | ::com::sun::star::lang::IllegalArgumentException ) | ||||
Selects Node and initiates editing.
If TreeControlModel::Editable is FALSE or if there are no registered XTreeEditListener, this call has no effect.
Calling this method also ensures that Node will become visible.
| Node | the XTreeNode identifying a node. |
| com::sun::star::lang::IllegalArgumentException | if Node is not a valid node of the corresponding XTreeDataModel. |
| boolean stopEditing | ( | ) |
Ends the current editing session.
All registered XTreeEditListener are notified if an editing session was in progress
Has no effect if the tree isn't being edited.
|
attribute |
If the given URL points to a loadable graphic, the graphic is rendered before collapsed non leaf nodes.
This can be overridden for individual nodes by XTreeNode::getCollapsedGraphicURL()
|
attribute |
If the given URL points to a loadable graphic, the graphic is rendered before expanded non leaf nodes.
This can be overridden for individual nodes by XTreeNode::getExpandedGraphicURL()