WindowBuilder SWT Table - swt

Can you suggest me how to build a Table with Eclipse WindowBuilder Plugin and SWT?
I read the official docs but I found orrible example with fixed column size. I would like to build a Table who fit the parent container (I used composite) when it is resized.
P.S.: Maybe I should use Swing instead?? All valid example I have seen are with JTable..
Can you help me?
Thank you
Thank you for your reply!
I have to do a little GUI application for a friend, I'm not so practice nor with Swing neither with SWT.
Anyway I manage to do a Simple ApplicationWindow with menubar, some submenu item and a composite container under the menu where panel should appear when user clicks on menu item.
Than I manage to build a TableViewer inside that composite component.. but now I would like add another table in the same place (the table represents different thing and should appear or disappear when user click some menu button).
In Swing I see many example of CardLayout but nothing with SWT.
Can you suggest me a simple example of layered layout with SWT?? I have the impression that Swing is much more simple..
Thank you all

On my modest opinion, Swing is well documented than SWT and maybe more simple. I switched to it.
Thank you.

Related

How to implement a image list control with SWT?

Does anybody have any idea on how to easily implement a image list(like the windows explorer with medium icons) control with swt? it seems like that it could be done easily with CListCtrl in c++ on windows, but does not seem to be easy with swt? any hints are appreciated!
Up to me, you need to create your own widget (check e.g. http://www.snip2code.com/Snippet/11489/Custom-SWT-List-Box) and add composite items to your custom list.
If vertical-only scrolling is enough, I suggest you rely on a single column TableViewer. This is what I did in a project where I needed a gallery-like window allowing the user to pick a graphical component based on displayed thumbnails.
You just need to implement the proper TableLabelProvider.getColumnImage and return the desired thumbnail corresponding to your list entry.
That gives a pretty decent list-like rendering.
In addition, TableViewer API is very well documented.

Can you create a resizable control in SWT?

I am currently working with the SWT package in Eclipse. Is it possible to create a resizable control within a composite control.
For instance, if I have a tree control which I would like to expand, but in order to view the sub tree items I would like to 'click and drag' the border of the tree to resize it, much like the draggable divider in the Eclipse help website.
I think the SWT Sash is what you are looking for.
Here is a good example on how to use it.
EDIT:
Just found that SashForm is much easier to use. See LINK for a good example.

eclipse rcp : more powerful table widget?

It seems swt table does't allow us to operate on multiple cells ?My application need a feature like this "select a range of cells, then copy cell text to excel, or paste text into cells".I think this will be a handy feature.
Any solution on this ?
best regards
Take a look at the nat table component, see http://www.nattable.org/drupal/
This component has many features that are not covered by the basic SWT table widget
For people reaching this, NatTable has been moved to Eclipse Nebula.
https://eclipse.org/nebula
It also contains Grid and XViewer as table alternatives.

Dynamically create Eclipse Perspective with views

I can create an Eclipse perspective and add viewparts to it using plugin.xml and the declarative definitions.
However, I need to programatically create a perspective, set its name/title and add two viewparts to it in a split-view (one viewpart on the left and the other on the right).
I have searched the net and read through a lot of documentation but can't figure out how to do this. Does anyone have a small example of this? Maybe knows what to search for?
You should be to create a new perspective via IPerspectiveRegistry.clonePerspective(String id, String label, IPerspectiveDescriptor desc). Here the original perspective, desc, can be null, but I haven't found a way to set the image for the new perspective.
You can add the needed views via IWorkbenchPage.showView(...), but have never figured out how to lay out the new view in the perspective...

GWT Table with collapsible rows

Anyone know an open source component for a GWT Table with collapsible rows?
If you want to stick with "pure" GWT, check out the TreeTable (demo) from the GWT Incubator project - it seems exactly what you are looking for.
I believe SmartGWT is open source.
It contains a GridList widget, which supports collapsible rows. See the showcase here. This is of course not a table, as you asked for, but it comes quite close :)