Hi Marco,

I tried the SortedTableModel community code with ULC 6.1.

I made one change to the code: Add the table to a ULCScrollpane.

Clicking on a column header initiates sorting and the header icons are shown
appropriately - meaning the headers are painted. I did not require a
repaint() stmt anywhere.

However, recently a colleague reported that repaint() of table header was
indeed required for correct functioning.

So, it seems there is some kind of a race condition going on here. We will
investigate this further and try to fix the issue in a future release.

Conclusion: For now repaint() of the header is required.

Thanks and regards,

Janak

>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] Behalf Of Etienne Studer
>Sent: Wednesday, June 07, 2006 11:04 PM
>To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
>Subject: RE: [ULC-developer] sortedTableModel, PR612, column Header
>Refresh
>
>
>Hi Marco
>
>I never updated the Community contribution with respect to the table
>header rendering, but calling getTable().getTableHeader().repaint()
>after setting a new header renderer is a proper workaround (no need to
>repaint the entire frame).
>
>I'm not sure if this got fixed in ULC, and if so, in which version. Btw,
>this problem is not related to what type of table model you are using.
>
>I'd be interested, too, whether repainting the header after setting a
>new header renderer is still necessary in the latest ULC release.
>
>Etienne
>
>
>> -----Original Message-----
>> From: [EMAIL PROTECTED] [mailto:ulc-developer-
>> [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
>> Sent: Wednesday, June 07, 2006 2:11 AM
>> To: [EMAIL PROTECTED]
>> Subject: [ULC-developer] sortedTableModel, PR612, column Header
>Refresh
>>
>>
>> Hi all,
>> i have tested etienne's SortedTableModel  from the code
>> community.
>> During testing this model i "think" i found a bug which already
>> has been reported and should have been solved.
>>
>> I have created a class extending UneditableDefaultTableModel and
>> have implemented all necessary methods inside (getvalueAt,
>> getRowCount...).
>>
>> After that i have adapted the UneditableDefaultTableModel to the
>> SortedTableModel :
>>
>>       private MagazineModelUneditable
>> getMagazineModelUneditable() {
>>             if (magazineModelUneditable == null) {
>>                   magazineModelUneditable = new
>> MagazineModelUneditable();
>>             }
>>             return magazineModelUneditable;
>>       }
>>
>>       private SortedTableModel getSortedTableModel() {
>>             if (sortedTableModel == null) {
>>                   sortedTableModel = new
>> SortedTableModel(getMagazineModelUneditable());
>>
>>                   ULCListSelectionModel selectionModel =
>> ulcTable.getSelectionModel();
>>                   ulcTable.getTableHeader().addActionListener(new
>> SortTableColumnHandler(sortedTableModel, selectionModel));
>>             }
>>             return sortedTableModel;
>>       }
>>
>> Now i have set the SortedTableModel as model for my table:
>>       ulcTable.setModel(getSortedTableModel());
>>
>> If i run now my application, the headericons will not be
>> repainted.
>> If i use the workaround:
>>
>> http://lists.canoo.com/mailman/private/ulc-developer/2005/002922.html
>> it works!!
>>
>> Does anybody know why?? Is this still a bug or have i made an
>> error including the sorted-table-model?
>>
>> thx a lot
>> marco
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> ULC-developer mailing list
>> [email protected]
>> http://lists.canoo.com/mailman/listinfo/ulc-developer
>_______________________________________________
>ULC-developer mailing list
>[email protected]
>http://lists.canoo.com/mailman/listinfo/ulc-developer

_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to