Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Table
Table [message #459542] Wed, 10 August 2005 11:37 Go to next message
Eclipse UserFriend
Originally posted by: nightblue99.yahoo.com

Hi;

I have been developing a standalone GUI builder for SWT. I have just
riched the point to create properties table for my beans editing. But
using the JFace table viewer, it only allows the define columns related
CellEditor. But my requirement is that created CellEditor in each row
according to the property of the bean in the row. For example let say bean
X have two properties 1. Text (StringCellEditor with text)
2. Visible(ComboCellEditor with TRUE or FALSE)

There must be two columns in the property table
1. Name (name of the property)
2. Value (value of the property).

Then the first row value column will be StringCellEditor and second row
of the value column will be the ComboCellEditor. I can't achieved this by
using the JFace. Is there any way to accomplish this task?

I looked at the project XSWT, it creates table from the scratch using the
Graphics and huge amount of code. Could I use this code in my commerical
project?

Thanks for advance
Re: Table [message #459551 is a reply to message #459542] Wed, 10 August 2005 13:41 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
You can use TableEditor and create and manage editors for cells in your
table. You can still use TableViewer for the table but rather than using
StringCellEditor or ComboCellEditor, use TableEditor. The SWT TableEditor
allows you to have a different editor for each cell in the table. You can
make the editors appear only when the cell has "focus" or you can have them
always appear.

For examples of how to use TableEditor, see:

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet88.java?rev=HEAD&a mp;content-type=text/vnd.viewcvs-markup
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet124.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet149.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup

"nightblue" <nightblue99@yahoo.com> wrote in message
news:2524ebbe69c4ae85c586f7681dc92bce$1@www.eclipse.org...
> Hi;
>
> I have been developing a standalone GUI builder for SWT. I have just
> riched the point to create properties table for my beans editing. But
> using the JFace table viewer, it only allows the define columns related
> CellEditor. But my requirement is that created CellEditor in each row
> according to the property of the bean in the row. For example let say bean
> X have two properties 1. Text (StringCellEditor with text)
> 2. Visible(ComboCellEditor with TRUE or FALSE)
>
> There must be two columns in the property table
> 1. Name (name of the property)
> 2. Value (value of the property).
>
> Then the first row value column will be StringCellEditor and second row of
> the value column will be the ComboCellEditor. I can't achieved this by
> using the JFace. Is there any way to accomplish this task?
>
> I looked at the project XSWT, it creates table from the scratch using the
> Graphics and huge amount of code. Could I use this code in my commerical
> project?
>
> Thanks for advance
>
Previous Topic:How to add a menu item in a popupmenu in the desire group.
Next Topic:basic cursor question
Goto Forum:
  


Current Time: Sat Apr 10 20:10:21 GMT 2021

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

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

Back to the top