Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Is there a standard TableViewSorter?
Is there a standard TableViewSorter? [message #461410] Wed, 10 January 2007 11:39 Go to next message
Eclipse UserFriend
I want to allow the user to sort a table by clicking on the column header.
Is there a standard way in JFace/RCP to implement this? Or do I have to
roll my own ViewerSorter which responds to mouse clicks?

Thanks

Mark
Re: Is there a standard TableViewSorter? [message #461495 is a reply to message #461410] Wed, 10 January 2007 12:18 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

No there isn't but I once dicussed this privately with JFace leads.
Please file a bug report agains Platform>UI and prefix your Summary with
the word [Viewers]. Still I don't think if anybody else volunteers to
implement it it won't go in 3.3 because API freeze is in about 4 weeks.

Tom

Mark McLaren schrieb:
> I want to allow the user to sort a table by clicking on the column
> header. Is there a standard way in JFace/RCP to implement this? Or do I
> have to roll my own ViewerSorter which responds to mouse clicks?
>
> Thanks
>
> Mark
>
>
>
>
Re: Is there a standard TableViewSorter? [message #461520 is a reply to message #461495] Thu, 11 January 2007 04:53 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the quick response - entered as Bug 170187.

Mark
Re: Is there a standard TableViewSorter? [message #461530 is a reply to message #461520] Thu, 11 January 2007 07:05 Go to previous messageGo to next message
Eclipse UserFriend
Mark McLaren wrote:
> Thanks for the quick response - entered as Bug 170187.
>
> Mark
>
There is a ViewerSorter class that you need to extend and implement a
compare and doSort methods. Then you just tableviewer.setSorter(your
sorter).
Re: Is there a standard TableViewSorter? [message #461531 is a reply to message #461530] Thu, 11 January 2007 07:28 Go to previous message
Eclipse UserFriend
Hi,

Well I guess he knows that but what he requests is that JFace wraps this
for him.

Something like (the code below uses the new Viewer-API):

------------------8<------------------
TableViewerColumn vcolumn = new TableViewerColumn(tableViewer,SWT.NONE);
vColumn.setComparator(new CustomViewerComparator());
// this automatically sets up all listeners in the background
// no other custom code needed
....
------------------8<------------------

Tom

Jim Leotta schrieb:
> Mark McLaren wrote:
>> Thanks for the quick response - entered as Bug 170187.
>>
>> Mark
>>
> There is a ViewerSorter class that you need to extend and implement a
> compare and doSort methods. Then you just tableviewer.setSorter(your
> sorter).
Previous Topic:Action set, Editor input
Next Topic:Problems with dezerialization // regarding ObjectInputStream
Goto Forum:
  


Current Time: Mon Mar 17 02:07:08 EDT 2025

Powered by FUDForum. Page generated in 0.28525 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top