Multi column TreeViewer

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Multi column TreeViewer

Postby cyril.lakech » Fri Aug 22, 2008 4:20 am

Hi,

I'm trying to create a multi column viewer with BeansListObservableFactory, TreeBeanAdvisor, ObservableListTreeContentProvider et...

but i get an erro when i use a attributeMaps and a ObservableMapLabelProvider;

IObservableMap[] attributeMaps = BeansObservables.observeMaps(
resultatCompositegetTreeResultatViewerListContentProvider
.getKnownElements(), NavigableAVO.class, new String[] {
"libelle", "foor", "bar" });
myViewer.setLabelProvider(new ObservableMapLabelProvider(attributeMaps));

I'm not sure of the input to set in the viewer...

an ModelObject, a List, a WritableList, a WritableMap... i'm lost !

Is there a sample of multi column viewer with databing ?

PS: I already see the PhoneBookUsingTreeViewer sample of DataBindingTest.zip but in this sample we don't use the classes BeansListObservableFactory, TreeBeanAdvisor, ObservableListTreeContentProvider. We write our Content and Label providers.

PS2: I already see the sample TreeTest using TreeObservableLabelProvider but there is only one column.
cyril.lakech
 
Posts: 19
Joined: Tue Aug 19, 2008 11:35 pm

Re: Multi column TreeViewer

Postby cyril.lakech » Fri Aug 22, 2008 4:35 am

I see there is a new Design support to edit databing on viewers, but i don't managed to generate databinding for a multi column tree, that's why i am trying to code "by hand".
cyril.lakech
 
Posts: 19
Joined: Tue Aug 19, 2008 11:35 pm

Re: Multi column TreeViewer

Postby Eric Clayberg » Sat Aug 23, 2008 10:52 am

cyril.lakech wrote:Is there a sample of multi column viewer with databing?

I have never seen one, but that would be a good question for the eclipse.platform newsgroup.

It doesn't look like the Eclipse DB API supports this "out of the box". You would need to write your own custom LabelProvider class...

Image
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 2 guests