Skip to main content



      Home
Home » Eclipse Projects » JFace » how to sort ComboBoxCellEditor in a table(how to sort ComboBoxCellEditor in a table)
how to sort ComboBoxCellEditor in a table [message #651673] Tue, 01 February 2011 03:32 Go to next message
Eclipse UserFriend
Hi ..

How to Sort ComboBoxCellEditor Colum in a table


Regards,
Raj
Re: how to sort ComboBoxCellEditor in a table [message #651937 is a reply to message #651673] Wed, 02 February 2011 01:51 Go to previous message
Eclipse UserFriend
On 2011-02-01 09:32, raj wrote:
> How to Sort ComboBoxCellEditor Colum in a table

You need to sort it's items that you get via getItems().

It might be worth to add one undocumented characteristics:

ComboBoxCellEditor does not clone the items when accepting them nor does
it do so when returning them, this means you can invoke
Arrays.sort with or without your defined Comparator directly on the
return value of getItems() and invoke setItems() again which will
repopulate the CelllEditor with the sorted items.

HTH & Greetings from Bremen,

Daniel Krügler
Previous Topic:[Preferences] StringFieldEditor misses setter for widthInChars
Next Topic:Programmatically Edit TableViewer
Goto Forum:
  


Current Time: Wed Jul 23 17:12:23 EDT 2025

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

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

Back to the top