LibreOffice
LibreOffice 24.2 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. More... | |
Public Member Functions | |
boolean | isNodeExpanded ([in] XTreeNode Node) raises ( ::com::sun::star::lang::IllegalArgumentException ) |
Returns TRUE if Node is currently expanded. More... | |
boolean | isNodeCollapsed ([in] XTreeNode Node) raises ( ::com::sun::star::lang::IllegalArgumentException ) |
Returns TRUE if Node is currently collapsed. More... | |
void | makeNodeVisible ([in] XTreeNode Node) raises ( com::sun::star::lang::IllegalArgumentException, ExpandVetoException ) |
Ensures that Node is currently visible. More... | |
boolean | isNodeVisible ([in] XTreeNode Node) raises ( com::sun::star::lang::IllegalArgumentException ) |
Returns TRUE if Node is currently visible. More... | |
void | expandNode ([in] XTreeNode Node) raises ( com::sun::star::lang::IllegalArgumentException, ExpandVetoException ) |
Ensures that Node is expanded and visible. More... | |
void | collapseNode ([in] XTreeNode Node) raises ( com::sun::star::lang::IllegalArgumentException, ExpandVetoException ) |
Ensures that Node is collapsed. More... | |
void | addTreeExpansionListener ([in] XTreeExpansionListener Listener) |
Adds a listener for TreeExpansion events. More... | |
void | removeTreeExpansionListener ([in] XTreeExpansionListener Listener) |
Removes a listener for TreeExpansion events. More... | |
XTreeNode | getNodeForLocation ([in] long x, [in] long y) |
Returns the node at the specified location. More... | |
XTreeNode | getClosestNodeForLocation ([in] long x, [in] long y) |
Returns the node that is closest to x,y. More... | |
::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 More... | |
boolean | isEditing () |
Returns TRUE if one of tree's nodes is being currently edited. More... | |
boolean | stopEditing () |
Ends the current editing session. More... | |
void | cancelEditing () |
Cancels the current editing session. More... | |
void | startEditingAtNode ([in] XTreeNode Node) raises ( ::com::sun::star::lang::IllegalArgumentException ) |
Selects Node and initiates editing. More... | |
void | addTreeEditListener ([in] XTreeEditListener Listener) |
Adds a XTreeEditListener. More... | |
void | removeTreeEditListener ([in] XTreeEditListener Listener) |
Removes a XTreeEditListener. More... | |
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. More... | |
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. More... | |
void | clearSelection () |
clears the selection of this XMultiSelectionSupplier. More... | |
long | getSelectionCount () |
returns the number of selected objects of this XMultiSelectionSupplier. More... | |
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. More... | |
any | getSelection () |
void | addSelectionChangeListener ([in] com::sun::star::view::XSelectionChangeListener xListener) |
registers an event listener, which is called when the selection changes. More... | |
void | removeSelectionChangeListener ([in] com::sun::star::view::XSelectionChangeListener xListener) |
unregisters an event listener which was registered with XSelectionSupplier::addSelectionChangeListener(). More... | |
Public Member Functions inherited from XInterface | |
any | queryInterface ([in] type aType) |
queries for a new interface to an existing UNO object. More... | |
void | acquire () |
increases the reference counter by one. More... | |
void | release () |
decreases the reference counter by one. More... | |
Public Attributes | |
string | DefaultExpandedGraphicURL |
If the given URL points to a loadable graphic, the graphic is rendered before expanded non leaf nodes. More... | |
string | DefaultCollapsedGraphicURL |
If the given URL points to a loadable graphic, the graphic is rendered before collapsed non leaf nodes. More... | |
An interface to a control that displays a set of hierarchical data as an outline.
interface ::com::sun::star::view::XMultiSelectionSupplier |
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().
TRUE
if the user is currently editing a node 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 |
TRUE
if Node or at least one of its parent nodes are collapsed, FALSE
if Node and all of its parent nodes are expandedcom::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. |
FALSE
if Node or at least one of its parent nodes are collapsed, TRUE
if Node and all of its parent nodes are expanded.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.
TRUE
if Node is visible, otherwise FALSE
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.
TRUE
if editing was in progress and is now stopped, FALSE
if editing was not in progress
|
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()