Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


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

unpublished service SortableGridDataModel
Supported Interface
XSortableMutableGridDataModel
Usage Restrictions
not published
Description
provides a default implementation of a XSortableGridData.

This service must be created with a secondary grid data model, which all actual data requests are delegated to. But before providing this data to the service's own clients, it is sorted, according to the sort order defined via the XSortableGridData interface.

The service implementation is able to compare the default scalar types, plus strings.

For determining the data type of a column which the data should be sorted by, the first non-void data encountered in this column is taken into account. Further read requests to this column will assume that all non-void data is of the same type.

Consequently, you cannot use this service with data sets containing heterogenous data in a given column.

All requests made via the XMutableGridDataModel are delegated to the XMutableGridDataModel instance passed in the service constructor.

Note that changing the data might result in the sort order being destroyed. If you want to ensure that the data represented by the model is still sorted after your modifications, you should call XSortableGridData::sortByColumn, again.



Constructors' Summary
create creates a new instance of the SortableGridDataModel  
createWithCollator creates a new instance of the ScortableDefaultGridDataModel, passing a collator to be used for string comparison.  
Constructors' Details
create
create( [in] XMutableGridDataModel  DelegatorModel )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
creates a new instance of the SortableGridDataModel

For string comparison, a default ::com::sun::star::i18n::Collator, based on the system's locale, will be used.

Parameter DelegatorModel
the data model to which read requests are delegated.
Throws
::com::sun::star::lang::IllegalArgumentException if the given DelegatorModel is NULL
createWithCollator
createWithCollator( [in] XMutableGridDataModel  DelegatorModel,
[in] ::com::sun::star::i18n::XCollator  Collator )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
creates a new instance of the ScortableDefaultGridDataModel, passing a collator to be used for string comparison.
Parameter DelegatorModel
is the data model to which read requests are delegated
Parameter Collator
is the collator to be used for string comparison
Throws
::com::sun::star::lang::IllegalArgumentException if the given DelegatorModel is NULL

 
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.