Overview | Module | Use | Devguide | Index

Methods' Summary | Attributes' Summary | Methods' Details | Attributes' Details

:: com :: sun :: star :: awt :: grid ::
interface XMutableGridDataModel
  Base Interfaces
      XMutableGridDataModel
      ┗ XGridDataModel
         ┣ ::com::sun::star::lang::XComponent
         ┗ ::com::sun::star::util::XCloneable
  XGridDataModel | (referenced interface's summary:) An instance of this interface is used by the UnoControlGrid to retrieve the content data that is displayed in the actual control. If you do not need your own model implementation, you can also use the DefaultGridDataModel.
Description allows to modify the data represented by a XGridDataModel

Methods' Summary
addRow | appends a row to the model.
addRows | appends multiple rows of data to the model.
insertRow | inserts a row into the set of data rows
insertRows | inserts multiple rows of data into the model.
removeRow | removes a row of data from the model
removeAllRows | Removes all rows from the model.
updateCellData | updates the content of the given cell
updateRowData | updates the content of a given row.
updateRowHeading | sets a new title for a given row.
updateCellToolTip | updates the tooltip to be displayed for a given cell
updateRowToolTip | updates the tooltip for all cells of a given row
addGridDataListener | registers listener to be notified of data changes in the model
removeGridDataListener | revokes a listener which was previously registered via addGridDataListener

Methods' Details
addRow
void
addRow( | [in] any | Heading,
| [in] sequence< any > | Data );
Description appends a row to the model. Parameter Heading denotes the heading of the row. Parameter Data specifies the content of the row.
addRows
void
addRows( | [in] sequence< any > | Headings,
| [in] sequence< sequence< any > > | Data )
raises( | ::com::sun::star::lang::IllegalArgumentException );
Description appends multiple rows of data to the model. Parameter Headings denotes the headings of the to-be-added rows. Parameter Data specifies the data of the rows to be added. Throws ::com::sun::star::lang::IllegalArgumentException if `Titles` and `Data` are of different length.
insertRow
void
insertRow( | [in] long | Index,
| [in] any | Heading,
| [in] sequence< any > | Data )
raises( | ::com::sun::star::lang::IndexOutOfBoundsException );
Description inserts a row into the set of data rows Parameter Index denotes the position at which the row is to be inserted Parameter Heading denotes the heading of the row. Parameter Data specifies the content of the row. Throws ::com::sun::star::lang::IndexOutOfBoundsException if `Index` is smaller than `0` or greater than the number of rows in the model.
insertRows
void
insertRows( | [in] long | Index,
| [in] sequence< any > | Headings,
| [in] sequence< sequence< any > > | Data )
raises( | ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException );
Description inserts multiple rows of data into the model. Parameter Index denotes the position at which the rows are to be inserted Parameter Headings denotes the headings of the to-be-added rows. Parameter Data specifies the data of the rows to be added. Throws ::com::sun::star::lang::IllegalArgumentException if `Titles` and `Data` are of different length. Throws ::com::sun::star::lang::IndexOutOfBoundsException if `Index` is smaller than `0` or greater than the number of rows in the model.
removeRow
void
removeRow( | [in] long | RowIndex )
raises( | ::com::sun::star::lang::IndexOutOfBoundsException );
Description removes a row of data from the model Parameter RowIndex the index of the row that should be removed. Throws ::com::sun::star::lang::IndexOutOfBoundsException if the given index is invalid
removeAllRows
void
removeAllRows();
Description Removes all rows from the model.
updateCellData
void
updateCellData( | [in] long | ColumnIndex,
| [in] long | RowIndex,
| [in] any | Value )
raises( | ::com::sun::star::lang::IndexOutOfBoundsException );
Description updates the content of the given cell Parameter ColumnIndex the column index of the to-be-updated cell Parameter RowIndex the row index of the to-be-updated cell Parameter Value the new value of the cell. Throws ::com::sun::star::lang::IndexOutOfBoundsException if the row or column index is invalid
updateRowData
void
updateRowData( | [in] sequence< long > | ColumnIndexes,
| [in] long | RowIndex,
| [in] sequence< any > | Values )
raises( | ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException );
Description updates the content of a given row. The change in the data model will be notified to registered listeners via XGridDataListener::dataChanged. The GridDataEvent::FirstColumn and GridDataEvent::LastColumn will denote the smallest respectively largest column index from ColumnIndexes. Parameter ColumnIndexes contains the column indexes of the cells, which should be updated Parameter RowIndex contains the index of the row whose data is to be updated Parameter Values specifies the new values of the cells. Throws ::com::sun::star::lang::IndexOutOfBoundsException if one of the row indexes or the column index is invalid Throws ::com::sun::star::lang::IllegalArgumentException if the lengths of the `ColumnIndexes` and `Values` sequences are not equal.
updateRowHeading
void
updateRowHeading( | [in] long | RowIndex,
| [in] any | Heading )
raises( | ::com::sun::star::lang::IndexOutOfBoundsException );
Description sets a new title for a given row. Throws ::com::sun::star::lang::IndexOutOfBoundsException if the given index does not denote a valid row.
updateCellToolTip
void
updateCellToolTip( | [in] long | ColumnIndex,
| [in] long | RowIndex,
| [in] any | Value )
raises( | ::com::sun::star::lang::IndexOutOfBoundsException );
Description updates the tooltip to be displayed for a given cell See also XGridDataModel::getCellToolTip
updateRowToolTip
void
updateRowToolTip( | [in] long | RowIndex,
| [in] any | Value )
raises( | ::com::sun::star::lang::IndexOutOfBoundsException );
Description updates the tooltip for all cells of a given row Effectively this method is a shortcut for calling updateCellToolTip multiple times in a row, for all cells of a given row. See also XGridDataModel::getCellToolTip, updateCellToolTip
addGridDataListener
void
addGridDataListener( | [in] XGridDataListener | Listener );
Description registers listener to be notified of data changes in the model Parameter Listener specifies the listener to register
removeGridDataListener
void
removeGridDataListener( | [in] XGridDataListener | Listener );
Description revokes a listener which was previously registered via addGridDataListener Parameter Listener specifies the listener to revoke.

Top of Page

Copyright © 2000, 2014 LibreOffice contributors and/or their affiliates. All rights reserved.

LibreOffice was created by The Document Foundation, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.

The Document Foundation acknowledges all community members, please find more info at our website.

Privacy Policy | Impressum (Legal Info) | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (LGPLv3). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.