1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_awt_tree_XTreeNode_idl__ 28#define __com_sun_star_awt_tree_XTreeNode_idl__ 29 30#ifndef __com_sun_star_container_XEnumerationAccess_idl__ 31#include <com/sun/star/container/XEnumerationAccess.idl> 32#endif 33 34#ifndef _com_sun_star_lang_IndexOutOfBoundsException_idl_ 35#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 36#endif 37 38//============================================================================= 39 40module com { module sun { module star { module awt { module tree { 41 42//============================================================================= 43 44/** An instance implementing this interface represents the model data for an entry in a 45 <type>XTreeDataModel</type>. 46 <p>The <type>TreeControl</type> uses this interface to retrieve the model 47 information needed to display a hierarchical outline</p> 48 <p>Each XTreeNode in a <type>XTreeDataModel</type> must be unique. 49 */ 50published interface XTreeNode 51{ 52 /** Returns the child tree node at <var>Index</var>. 53 54 @throws ::com::sun::star::lang::IndexOutOfBoundsException 55 if <var>Index</var> is less than 0 or equal or greater then <member>getChildCount</member>. 56 */ 57 XTreeNode getChildAt( [in] long Index ) 58 raises( com::sun::star::lang::IndexOutOfBoundsException ); 59 60 /** Returns the number of child nodes. */ 61 long getChildCount(); 62 63 /** Returns the parent node of this node. */ 64 XTreeNode getParent(); 65 66 /** Returns the index of <var>Node</Node> in this instances children. 67 @returns 68 The child index of <var>Node</Node> , or -1 if <var>Node</Node> is no child of this instance. 69 */ 70 long getIndex( [in] XTreeNode Node); 71 72 /** Returns <TRUE/> if the children of this node are created on demand. 73 <p>A <type>TreeControl</type> will handle a node that returns <TRUE/> always 74 like a node that has child nodes, even if <member>getChildCount</member> 75 returns 0.</p> 76 77 @see TreeExpansionListener; 78 */ 79 boolean hasChildrenOnDemand(); 80 81 /** If not empty, the textual representation of this any is used as the text part of this node. 82 */ 83 any getDisplayValue(); 84 85 /** The URL for a graphic that is rendered before the text part of this node. 86 <p>If this URL is empty, no graphic is rendered. 87 */ 88 string getNodeGraphicURL(); 89 90 /** The URL for a graphic that is rendered to visualize expanded non leaf nodes. 91 <p>If <var>URL</var> is empty, <member>XTreeControl::DefaultExpandedGraphicURL</member> is used. 92 */ 93 string getExpandedGraphicURL(); 94 95 /** The URL for a graphic that is rendered to visualize collapsed non leaf nodes. 96 <p>If <var>URL</var> is empty, <member>XTreeControl::DefaultCollapsedGraphicURL</member> is used. 97 */ 98 string getCollapsedGraphicURL(); 99}; 100 101//============================================================================= 102 103}; }; }; }; }; 104 105#endif 106