:: com :: sun :: star :: awt :: grid ::

unpublished interface XGridDataModel
Base Interfaces
XGridDataModel
┗ ::com::sun::star::lang::XComponent

::com::sun::star::lang::XComponent
(referenced interface's summary:)
allows to exclicitly free resources and break cyclic references.
Usage Restrictions
not published
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.

Methods' Summary
getRowCount Returns the number of rows in in the model.  
addRow Adds a row to the model.  
removeRow Removes a row from the model.  
removeAll Removes all rows from the model.  
addDataListener Adds a listener for the GridDataEvent posted after the grid changes.  
removeDataListener Removes a listener previously added with addDataListener().  
Attributes' Summary
RowHeight Specifies the height of each row.  
RowHeaders Contains the row header.  
Data Returns the content of each row.  
Methods' Details
getRowCount
long
getRowCount();

Description
Returns the number of rows in in the model.
Returns
the number of rows.
addRow
void
addRow( [in] string  headername,
[in] sequence< string >  data );

Description
Adds a row to the model.
Parameter headername
specifies the name of the row.
Parameter data
the content of the row.
removeRow
void
removeRow( [in] long  index );

Description
Removes a row from the model.
Parameter index
the index of the row that should be removed.
removeAll
void
removeAll();

Description
Removes all rows from the model.
addDataListener
[oneway] void
addDataListener( [in] XGridDataListener  listener );

Description
Adds a listener for the GridDataEvent posted after the grid changes.
Parameter Listener
the listener to add.
removeDataListener
[oneway] void
removeDataListener( [in] XGridDataListener  listener );

Description
Removes a listener previously added with addDataListener().
Parameter Listener
the listener to remove.
Attributes' Details
RowHeight
long RowHeight;
Description
Specifies the height of each row.
RowHeaders
sequence< string > RowHeaders;
Description
Contains the row header.
Data
[ readonly ] sequence< sequence< string > > Data;
Description
Returns the content of each row.
Top of Page