1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23#ifndef __com_sun_star_awt_tree_XTreeNode_idl__ 24#define __com_sun_star_awt_tree_XTreeNode_idl__ 25 26#ifndef __com_sun_star_container_XEnumerationAccess_idl__ 27#include <com/sun/star/container/XEnumerationAccess.idl> 28#endif 29 30#ifndef _com_sun_star_lang_IndexOutOfBoundsException_idl_ 31#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 32#endif 33 34//============================================================================= 35 36module com { module sun { module star { module awt { module tree { 37 38//============================================================================= 39 40/** An instance implementing this interface represents the model data for an entry in a 41 <type>XTreeDataModel</type>. 42 <p>The <type>TreeControl</type> uses this interface to retrieve the model 43 information needed to display a hierarchical outline</p> 44 <p>Each XTreeNode in a <type>XTreeDataModel</type> must be unique. 45 */ 46published interface XTreeNode 47{ 48 /** Returns the child tree node at <var>Index</var>. 49 50 @throws ::com::sun::star::lang::IndexOutOfBoundsException 51 if <var>Index</var> is less than 0 or equal or greater then <member>getChildCount</member>. 52 */ 53 XTreeNode getChildAt( [in] long Index ) 54 raises( com::sun::star::lang::IndexOutOfBoundsException ); 55 56 /** Returns the number of child nodes. */ 57 long getChildCount(); 58 59 /** Returns the parent node of this node. */ 60 XTreeNode getParent(); 61 62 /** Returns the index of <var>Node</Node> in this instances children. 63 @returns 64 The child index of <var>Node</Node> , or -1 if <var>Node</Node> is no child of this instance. 65 */ 66 long getIndex( [in] XTreeNode Node); 67 68 /** Returns <TRUE/> if the children of this node are created on demand. 69 <p>A <type>TreeControl</type> will handle a node that returns <TRUE/> always 70 like a node that has child nodes, even if <member>getChildCount</member> 71 returns 0.</p> 72 73 @see TreeExpansionListener; 74 */ 75 boolean hasChildrenOnDemand(); 76 77 /** If not empty, the textual representation of this any is used as the text part of this node. 78 */ 79 any getDisplayValue(); 80 81 /** The URL for a graphic that is rendered before the text part of this node. 82 <p>If this URL is empty, no graphic is rendered. 83 */ 84 string getNodeGraphicURL(); 85 86 /** The URL for a graphic that is rendered to visualize expanded non leaf nodes. 87 <p>If <var>URL</var> is empty, <member>XTreeControl::DefaultExpandedGraphicURL</member> is used. 88 */ 89 string getExpandedGraphicURL(); 90 91 /** The URL for a graphic that is rendered to visualize collapsed non leaf nodes. 92 <p>If <var>URL</var> is empty, <member>XTreeControl::DefaultCollapsedGraphicURL</member> is used. 93 */ 94 string getCollapsedGraphicURL(); 95}; 96 97//============================================================================= 98 99}; }; }; }; }; 100 101#endif 102