1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef __com_sun_star_awt_grid_XMutableGridDataModel_idl__
29 #define __com_sun_star_awt_grid_XMutableGridDataModel_idl__
31 #include
<com
/sun
/star
/awt
/grid
/XGridDataModel.idl
>
32 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
33 #include
<com
/sun
/star
/lang
/IndexOutOfBoundsException.idl
>
35 //==================================================================================================================
37 module com
{ module sun
{ module star
{ module awt
{ module grid
{
39 //==================================================================================================================
41 /** allows to modify the data represented by a <type>XGridDataModel</type>
43 interface XMutableGridDataModel
: XGridDataModel
45 /** adds a row to the model.
48 denotes the heading of the row.
50 specifies the content of the row.
52 void addRow
( [in] any Heading
, [in] sequence
< any
> Data
);
54 /** adds multiple rows of data to the model.
56 denotes the headings of the to-be-added rows.
58 specifies the data of the rows to be added.
59 @throws ::com::sun::star::lang::IllegalArgumentException
60 if <code>Titles</code> and <code>Data</code> are of different length.
62 void addRows
( [in] sequence
< any
> Headings
, [in] sequence
< sequence
< any
> > Data
)
63 raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
);
65 /** removes a row of data from the model
68 the index of the row that should be removed.
69 @throws ::com::sun::star::lang::IndexOutOfBoundsException
70 if the given index is invalid
72 void removeRow
( [in] long RowIndex
)
73 raises
( ::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
75 /** Removes all rows from the model.
79 /** updates the content of the given cell
81 the column index of the to-be-updated cell
83 the row index of the to-be-updated cell
85 the new value of the cell.
86 @throws ::com::sun::star::lang::IndexOutOfBoundsException
87 if the row or column index is invalid
89 void updateCellData
( [in] long ColumnIndex
, [in] long RowIndex
, [in] any Value
)
90 raises
( ::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
92 /** updates the content of a given row.
94 <p>The change in the data model will be notified to registered listeners via
95 <member>XGridDataListener::dataChanged</member>. The <member>GridDataEvent::FirstColumn</member> and
96 <member>GridDataEvent::LastColumn</member> will denote the smallest respectively largest column
97 index from <arg>ColumnIndexes</arg>.</p>
100 contains the column indexes of the cells, which should be updated
102 contains the index of the row whose data is to be updated
104 specifies the new values of the cells.
105 @throws ::com::sun::star::lang::IndexOutOfBoundsException
106 if one of the row indexes or the column index is invalid
107 @throws ::com::sun::star::lang::IndexOutOfBoundsException
108 if the lengths of the <code>ColumnIndexes</code> and <code>Values</code> sequences are not equal.
110 void updateRowData
( [in] sequence
< long > ColumnIndexes
, [in] long RowIndex
, [in] sequence
< any
> Values
)
111 raises
( ::com
::sun
::star
::lang
::IndexOutOfBoundsException
112 , ::com
::sun
::star
::lang
::IllegalArgumentException
);
114 /** sets a new title for a given row.
116 @throws ::com::sun::star::lang::IndexOutOfBoundsException
117 if the given index does not denote a valid row.
120 updateRowHeading
( [in] long RowIndex
, [in] any Heading
)
121 raises
( ::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
123 /** updates the tooltip to be displayed for a given cell
125 @see XGridDataModel::getCellToolTip
127 void updateCellToolTip
( [in] long ColumnIndex
, [in] long RowIndex
, [in] any Value
)
128 raises
( ::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
130 /** updates the tooltip for all cells of a given row
132 <p>Effectively this method is a shortcut for calling <member>updateCellToolTip</member> multiple
133 times in a row, for all cells of a given row.</p>
135 @see XGridDataModel::getCellToolTip
136 @see updateCellToolTip
138 void updateRowToolTip
( [in] long RowIndex
, [in] any Value
)
139 raises
( ::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
141 //-------------------------------------------------------------------------
143 /** registers listener to be notified of data changes in the model
145 specifies the listener to register
147 void addGridDataListener
( [in] XGridDataListener Listener
);
149 //-------------------------------------------------------------------------
151 /** revokes a listener which was previously registered via <member>addGridDataListener</member>
153 specifies the listener to revoke.
155 void removeGridDataListener
( [in] XGridDataListener Listener
);
158 //==================================================================================================================
162 //==================================================================================================================
166 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */