[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: Can the FilteredList have columns?

Well mainly we are porting a Swing UI which has a table with a text field that filters the table entries as the user types in it. Exactly what the FilteredList and FilteredTree do. The only difference between the 2 is that our current UI element actually has several columns. Plus the FilteredList/Tree classes have UI enhancements to clear the text control, etc.

While we could try and concatenate the column strings into a single line of text to be included in the FilteredList, the info likely will not line up as nicely as in table columns proper. We could also create our own composite with a text control and a tableviewer, but we was hoping to reuse and customize the FilteredList class if possible. No need to suffer from NIH if we don't have to.

Wb



Eric Rizzo wrote:
On 2/16/2009 4:00 PM, Wendell Beckwith wrote:
The FilteredList class seems to be what I need from a UI since, however,
I need several columns to be a part of the list with the associated
sorting by column. Is this class extensible in this way or via
subclassing or am I looking at creating a new Composite with the same
behavior?

Any reason you can not use a TableViewer instead? It extends StructuredViewer which supports filtering and column-based sorting. See this snippet for example: http://wiki.eclipse.org/index.php/JFaceSnippets#Snippet040TableViewerSorting



Hope this helps, Eric