1/************************************************************************* 2 * 3 * $Revision: 1.8 $ 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 * 6 * Copyright 2000, 2010 Oracle and/or its affiliates. 7 * 8 * OpenOffice.org - a multi-platform office productivity suite 9 * 10 * This file is part of OpenOffice.org. 11 * 12 * OpenOffice.org is free software: you can redistribute it and/or modify 13 * it under the terms of the GNU Lesser General Public License version 3 14 * only, as published by the Free Software Foundation. 15 * 16 * OpenOffice.org is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU Lesser General Public License version 3 for more details 20 * (a copy is included in the LICENSE file that accompanied this code). 21 * 22 * You should have received a copy of the GNU Lesser General Public License 23 * version 3 along with OpenOffice.org. If not, see 24 * <http://www.openoffice.org/license.html> 25 * for a copy of the LGPLv3 License. 26 * 27 ************************************************************************/ 28#ifndef __com_sun_star_awt_grid_XGridDataModel_idl__ 29#define __com_sun_star_awt_grid_XGridDataModel_idl__ 30 31 32#include <com/sun/star/lang/XComponent.idl> 33#include <com/sun/star/util/XCloneable.idl> 34#include <com/sun/star/awt/grid/XGridDataListener.idl> 35#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 36 37//============================================================================= 38 39module com { module sun { module star { module awt { module grid { 40 41//============================================================================= 42/** An instance of this interface is used by the <type>UnoControlGrid</type> to 43 retrieve the content data that is displayed in the actual control. 44 45 If you do not need your own model implementation, you can also use the <type>DefaultGridDataModel</type>. 46 47 @since OOo 3.3 48*/ 49published interface XGridDataModel 50{ 51 /** implements life time control for the component 52 */ 53 interface ::com::sun::star::lang::XComponent; 54 55 /** allows cloning the complete data model 56 */ 57 interface ::com::sun::star::util::XCloneable; 58 59 /** denotes the number of rows for which the model can provide data 60 */ 61 [attribute, readonly] long RowCount; 62 63 /** denotes the number of columns for which the model can provide data 64 */ 65 [attribute, readonly] long ColumnCount; 66 67 /** retrieves the data for a given cell 68 69 @throws ::com::sun::star::lang::IndexOutOfBoundsException 70 if the column or row index do not denote a valid cell position. 71 */ 72 any getCellData( [in] long Column, [in] long RowIndex ) 73 raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); 74 75 /** retrieves the tool tip to be displayed when the mouse hovers over a given cell 76 77 <p>At the moment, only string tool tips are supported.</p> 78 79 <p>If <VOID/> is returned here, the cell's content will be displayed as tip, but only if it does 80 not fit into the cell.</p> 81 82 @throws ::com::sun::star::lang::IndexOutOfBoundsException 83 if the column or row index do not denote a valid cell position. 84 */ 85 any getCellToolTip( [in] long Column, [in] long RowIndex ) 86 raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); 87 88 /** retrieves the heading of a given row 89 90 <p>A grid control will usually paint a row's title in the header column of the respective row.</p> 91 92 <p>At the moment, only strings are supported as row headings.</p> 93 94 @throws ::com::sun::star::lang::IndexOutOfBoundsException 95 if the given index does not denote a valid row. 96 */ 97 any 98 getRowHeading( [in] long RowIndex ) 99 raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); 100 101 /** retrieves the data for a complete row 102 103 <p>This method is provided for performance and convenience reasons, it delivers the same result 104 as subsequent calls to <member>getCellData</member> would.</p> 105 106 @param Row 107 the index of the row whose data should is to be retrieved. 108 @raises ::com::sun::star::lang::IndexOutOfBoundsException 109 of the given row index does not denote a valid row. 110 */ 111 sequence< any > 112 getRowData( [in] long RowIndex ) 113 raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); 114}; 115 116//============================================================================= 117 118}; }; }; };}; 119 120#endif 121