LibreOffice LibreOffice 26.2 SDK API Reference

Exported Interfaces | Public Member Functions | Public Attributes | List of all members
XGridDataModel Interface Referencepublished

An instance of this interface is used by the UnoControlGrid to retrieve the content data that is displayed in the actual control. More...

`import"XGridDataModel.idl";`

Inheritance diagram for XGridDataModel:

## Exported Interfaces
interface | ::com::sun::star::lang::XComponent
| implements life time control for the component More...
interface | ::com::sun::star::util::XCloneable
| allows cloning the complete data model More...

## Public Member Functions
any | getCellData ([in] long Column, [in] long RowIndex) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| retrieves the data for a given cell More...
any | getCellToolTip ([in] long Column, [in] long RowIndex) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| retrieves the tool tip to be displayed when the mouse hovers over a given cell More...
any | getRowHeading ([in] long RowIndex) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| retrieves the heading of a given row More...
sequence< any > | getRowData ([in] long RowIndex) raises ( ::com::sun::star::lang::IndexOutOfBoundsException )
| retrieves the data for a complete row More...
Public Member Functions inherited from XComponent
void | dispose ()
| The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references. More...
void | addEventListener ([in] XEventListener xListener)
| adds an event listener to the object. More...
void | removeEventListener ([in] XEventListener aListener)
| removes an event listener from the listener list. More...
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...
Public Member Functions inherited from XCloneable
com::sun::star::util::XCloneable | createClone ()
| creates a copy of the object. More...

## Public Attributes
long | RowCount
| denotes the number of rows for which the model can provide data More...
long | ColumnCount
| denotes the number of columns for which the model can provide data More...

## Detailed Description

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.

Since
  OOo 3.3

## Exported Interfaces

## ◆ ::com::sun::star::lang::XComponent

interface ::com::sun::star::lang::XComponent

implements life time control for the component

## ◆ ::com::sun::star::util::XCloneable

interface ::com::sun::star::util::XCloneable

allows cloning the complete data model

## Member Function Documentation

## ◆ getCellData()

any getCellData | ( | [in] long | Column,
|  | [in] long | RowIndex
| ) |  |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

retrieves the data for a given cell

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if the column or row index do not denote a valid cell position.

## ◆ getCellToolTip()

any getCellToolTip | ( | [in] long | Column,
|  | [in] long | RowIndex
| ) |  |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

retrieves the tool tip to be displayed when the mouse hovers over a given cell

At the moment, only string tool tips are supported.

If `VOID` is returned here, the cell's content will be displayed as tip, but only if it does not fit into the cell.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if the column or row index do not denote a valid cell position.

## ◆ getRowData()

sequence< any > getRowData | ( | [in] long | RowIndex | ) |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

retrieves the data for a complete row

This method is provided for performance and convenience reasons, it delivers the same result as subsequent calls to getCellData() would.

Parameters

  RowIndex | the index of the row whose data should is to be retrieved.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | of the given row index does not denote a valid row.

## ◆ getRowHeading()

any getRowHeading | ( | [in] long | RowIndex | ) |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

retrieves the heading of a given row

A grid control will usually paint a row's title in the header column of the respective row.

At the moment, only strings are supported as row headings.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | if the given index does not denote a valid row.

## Member Data Documentation

## ◆ ColumnCount

long ColumnCount
| attribute readonly

denotes the number of columns for which the model can provide data

## ◆ RowCount

long RowCount
| attribute readonly

denotes the number of rows for which the model can provide data

The documentation for this interface was generated from the following file:

- com/sun/star/awt/grid/XGridDataModel.idl