Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » TableViewer - sorting
TableViewer - sorting [message #297342] Thu, 12 January 2006 08:11 Go to next message
Eclipse UserFriend
Originally posted by: popeye.netcabo.pt

When data is shown in the tableviewer, the data by default is sorted on any column or it simple puts the data in the table as it got the data from the input object? which is the sorter mechanism by default?

The point is that i want to add some row entries, 1 by one, in the table after it has been created and shown and i want that the new messages appear in the top of the table instead of being sorted by anything.

Thanks,
Marco
Re: TableViewer - sorting [message #297376 is a reply to message #297342] Thu, 12 January 2006 15:35 Go to previous messageGo to next message
Boris Bokowski is currently offline Boris BokowskiFriend
Messages: 9
Registered: July 2009
Junior Member
See TableViewer.insert(Object, int).

Boris.

"Marco Ferreira" <popeye@netcabo.pt> schrieb im Newsbeitrag
news:23363933.1137053528501.JavaMail.root@cp1.javalobby.org...
> When data is shown in the tableviewer, the data by default is sorted on
> any column or it simple puts the data in the table as it got the data from
> the input object? which is the sorter mechanism by default?
>
> The point is that i want to add some row entries, 1 by one, in the table
> after it has been created and shown and i want that the new messages
> appear in the top of the table instead of being sorted by anything.
>
> Thanks,
> Marco
Re: TableViewer - sorting [message #297404 is a reply to message #297376] Fri, 13 January 2006 00:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: popeye.netcabo.pt

This method is for update the viewer. it doesn't affect the model and is to be used inside a content provider when the new data is already present in the object input data. i want to affect the model, i.e., add a new entry in the input object after the viewer has been shown. i'm doing it. but when the object input data is displayed in the viewer the new message appear somehow sorted. i thought that it was straightforward, due to the last message(the new) has been placed in the top(or end) of my data structure (an ArrayList). I suspect that the viewer has a sorter by default. What is the default sorter mechanism? how can i disable it? or change it?

Thanks,
Marco
Re: TableViewer - sorting [message #297409 is a reply to message #297376] Fri, 13 January 2006 07:12 Go to previous message
Eclipse UserFriend
Originally posted by: popeye.netcabo.pt

thank you for the help, its working...

i put the viewer.insert(obj, 0) instead of the normal viewer.add(obj) in the inputChanged method of my content provider class.

at first, i didn't understood what you meant with that method. then after some hours i saw the solution...a bit dumb, but i'm a beginner.
Previous Topic:Want to change the order of properties from view
Next Topic:Synchronize with repository explorer is gone?
Goto Forum:
  


Current Time: Mon Jul 22 00:31:05 GMT 2024

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

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

Back to the top