[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[riena-dev] Table Ridget

Christian,

a few comments on the ITableRidget interface. We can discuss these
points on Monday.

1. bindToModel(..., String[] columnPropertyNames, String[]
columnHeaders);

It's not specified what happens when columnPropertyNames.length !=
columnHeaders.length. My implementation handles this gracefully and
ignores missing / additional columns. An alternative would be to throw a
RuntimeException.

Should we document this in the interface?

2. bindToModel(..., String[] columnPropertyNames, String[]
columnHeaders);

Can columnHeaders be null? My implementation allows null on the basis
that the ListRidget (also implementing ITableRidget) allows null,
because the List widget does not have headers. This is done in order to
keep the "handling" of bindToModel similar across different uses making
it easier for the app developer. If columnHeaders is null, the table
will have it's headers hidden automatically. (The Swing implementation
does not allow null.)

We should decide if null is ok and document.

3. Unsorting a column programmatically: tableRidget.setSortedColumn(-1)
is not allowed but it still be accomplished using
tableRidget.setComparator(sortedColumnIndex, null). 

Is there a preference one way or the other?



4. My implementation uses a "creative" way (i.e. unicode char) to show a
"sortable" indicator in the table header. We should discuss if we want
to keep this.

5. My implementation makes all columns moveable by the user by default.
This may override different settings of the app developer.

Regards,
Elias.

---
Elias Volanakis
Technical Lead
Innoopract, Inc.
351 NW 12th Avenue
Portland, Oregon 97209
Tel: +1-503-552-1457
Fax: +1-503-715-4915
Mobile: +1-503-929-5537
evolanakis@xxxxxxxxxxxxxx
http://rapblog.innoopract.com