Type: required
Title: changes to the AWT grid control API
Posted by: [email protected]
Affected: api
Effective from: CWS gridsort
CWS:
<http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300/gridsort>
CWS status: new
*Summary*
--------
n/a
*Description*
-------------
The UNO grid control API has undergone several changes in CWS
gridsort. Some of those changes are compile-time incompatible,
potentially breaking existing client code this way. (Note that the API
was unpublished before, thus technically allowing this kind of change.
Though, even for unpublished API changing it incompatibly is not a
good thing, but we think the advantages of a cleaner and more
feature-rich API here outweight the disadvantages of incompatibility.)
The below list summarizes the changes which client code might be
affected by:
- introduced XSortableGridData, XSortableMutableGridDataModel,
SortableGridDataModel, providing support for grid data which can be
sorted by clicking onto a column header
- UnoControlGridModel
- moved RowHeaderWidth, ColumnHeaderHeight, RowHeight herein
(previously found at the column resp. data model)
- changed the color model API, now more clearly separating between
"default" and "client-provided" colors, supporting to customized more
aspects than before (e.g. the header colors), and allowing for
more than
2 client-provided alternating row colors
- XGridColumn
- removed PreferredWidth - the semantics in relationship to ColumnWidth
was not well-defined, and the property became useless, finally
- introduced Flexibility attribute, specifying the relative
flexibility when
columns are resized automatically to fit the available view space
- made Index attribute read-only
- introduced DataColumnIndex, decoupling the index of a column within
the column model from the index of the data column which it retrieves
its data from
- renamed add/removeColumnListener to add/removeGridColumnListener,
for sake of introspection compatibility
- derived from XComponent and XCloneable
- XGridColumnModel
- derived from XComponent, XContainer, and XCloneable
- added createColumn method, as the preferred way to create a column
which is compatible with the given column model implementation
- added removeColumn, complementing the existing addColumn
- XGridControl
- renamed getItemIndexAtPoint to getRowAtPoint
- introduced getColumnAtPoint
- removed the pretty magic setToolTip (tooltips are now controlled
via the
XGridDataModel)
- introduced getCurrentRow/Column
- XGridDataListener
- renamed rowAdded to rowsInserted
- renamed rowRemoved to rowsRemoved
- introduced rowHeadingChanged
- XGridDataModel
- derived from XComponent and XCloneable
- replaced the "Data" attribute, providing *all* data at once, with
cell-wise
access getCellData( Column, Row )
- introduced RowCount attribute
- introduced ColumnCount attribute, to not force clients to make
assumptions about a grid data model from the knowledge of a grid
column model
- introduced getCellToolTip
- replaced the RowHeaders attribute, providing access to all row headers
at once, with row-based getRowHeading method
- in general, replaced RowHeader strings with RowHeading anys, this
way allow for row headings other than mere strings (e.g. graphics,
though those are not implemented at the moment)
- moved all modifying functionality into XMutableGridDataModel, derived
from XGridDataModel:
- addRow (same as before at XGridDataModel)
- addRows (new)
- removeRow (as before)
- removeAllRows (formerly known as removeAll)
- updateCellData (new)
- updateRowData (shortcut for multiple udateCellData calls)
- updateRowHeading (new)
- updateCellToolTip (new)
- updateRowToolTip ((shortcut for multiple updateCellToolTip calls)
- XGridSelection
- removed getMin/MaxSelectionIndex without substitute
- removed de/selectRows
- introduced deselectRow, to complement the existing selectRow
Send feedback to [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]