« Return to Thread: SWT Table and Date columns

SWT Table and Date columns

by Matt P :: Rate this Message:

Reply to Author | View in Thread

Hi Everyone,

I am new to glazed lists, and already I have seen how useful they are to quickly set up tables in my SWT/JFACE application.

However, I am having one problem displaying and sorting Dates (java.util.Date) in my SWT Table.  Is there a way to add a custom renderer to change how the Date object is rendered into the string that is displayed in the table cell? and also keep the sorting to sort by the true date, regardless of the way its rendered?

The FAQ says to return java.util.Date to ensure proper sorting, which I am doing, but it doesnt sort by true date, but sorts by the toString of the Date.

Any help will be appreciated.

Thanks

 « Return to Thread: SWT Table and Date columns