Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TableViewer sort
TableViewer sort [message #438462] Thu, 24 June 2004 21:07 Go to next message
Eclipse UserFriend
Originally posted by: am560571.wcupa.edu

I have a tableViewer and I am passing Properties to set input and want
them to be sorted to keys.

so I have
fillTable(Properties prop)
{
tableViewer.setInput(props);
}

I somehow need to sort the properties before it is sent away to setInput
and I am need help doing that I know I can do the following:

Set keySet = prop.keySet();
ArrayList keyList = new ArrayList(keySet);
Collections.sort(keyList);

thanks for the help

later,
whatsgoingon
Re: TableViewer sort [message #438468 is a reply to message #438462] Fri, 25 June 2004 08:30 Go to previous messageGo to next message
Richard Moore is currently offline Richard MooreFriend
Messages: 71
Registered: July 2009
Member
Hi,

Try the
TABLEVIEW.setSorter(SORTER);

the SORTER class must extend ViwerSorter, and the compare method implement.
Each row will be sorted using this SORTER class.



Regards

R D Moore

"whatsgoingon" <am560571@wcupa.edu> wrote in message
news:cbffqf$fpn$1@eclipse.org...
> I have a tableViewer and I am passing Properties to set input and want
> them to be sorted to keys.
>
> so I have
> fillTable(Properties prop)
> {
> tableViewer.setInput(props);
> }
>
> I somehow need to sort the properties before it is sent away to setInput
> and I am need help doing that I know I can do the following:
>
> Set keySet = prop.keySet();
> ArrayList keyList = new ArrayList(keySet);
> Collections.sort(keyList);
>
> thanks for the help
>
> later,
> whatsgoingon
>
>
>
>
>
Re: TableViewer sort [message #438489 is a reply to message #438468] Fri, 25 June 2004 17:44 Go to previous message
Eclipse UserFriend
Originally posted by: am560571.wcupa.edu

Thank you that was easy!


later,
Aaron
Previous Topic:refresh a View from another View
Next Topic:Focus tricks
Goto Forum:
  


Current Time: Fri Apr 26 19:35:51 GMT 2024

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

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

Back to the top