Skip to main content



      Home
Home » Newcomers » Newcomers » Which Composite to use in this case ...
Which Composite to use in this case ... [message #270894] Mon, 18 May 2009 12:04 Go to next message
Eclipse UserFriend
Hi all,
I wrote a plug-in which displays (in a TableViewer) a list of items.
Using a SashForm I would add a second Composite to display the details
of a selected item.
By selecting another item, the details of the new selected item should
be displayed.

The details can be displayed using a GridLayout with numColumns = 2.
Details of a selected meeting can be displayed as follows:
Name Peter Zimmermann
Email P.Zimmermann@company.com
Phone +133328526126
Organization company
...
...
The composite should be able to display Widgets such as "Label", "Button".

I don't know which Widget I can use to realize this issue.

Please help
Thanks in advance.

Abdeltif Nouqrat
Re: Which Composite to use in this case ... [message #270903 is a reply to message #270894] Mon, 18 May 2009 13:50 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Abdeltif Nouqrat wrote:
> Hi all,
> I wrote a plug-in which displays (in a TableViewer) a list of items.
> Using a SashForm I would add a second Composite to display the details
> of a selected item.
> By selecting another item, the details of the new selected item should
> be displayed.
>
> The details can be displayed using a GridLayout with numColumns = 2.
> Details of a selected meeting can be displayed as follows:
> Name Peter Zimmermann
> Email P.Zimmermann@company.com
> Phone +133328526126
> Organization company
> ..
> ..
> The composite should be able to display Widgets such as "Label", "Button".
>
> I don't know which Widget I can use to realize this issue.

If you want to use the Eclipse Forms API
(http://www.google.com/search?q=eclipse+forms), you can use
MasterDetailBlock to do exactly what you want.

If for some reason you can't use then Forms API, then look at the layout
manager org.eclipse.swt.custom.StackLayout which allows you to easily
swap between multiple Composites (one for each type of item in your list).

Also note that, in either case, the DataBinding API can be a lot of help
for this kind of "master-detail" UI.

Hope this helps,
Eric
Previous Topic:Why do I not see the remote java application item in debug configuration menu?
Next Topic:Cannot open files with Eclipse
Goto Forum:
  


Current Time: Fri Jun 06 00:18:22 EDT 2025

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

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

Back to the top