Which Composite to use in this case ... [message #270894] |
Mon, 18 May 2009 12:04  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.08867 seconds