Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [ECP] Table Custom Control
[ECP] Table Custom Control [message #1725161] Tue, 01 March 2016 10:23 Go to next message
Roxana Paun is currently offline Roxana PaunFriend
Messages: 7
Registered: October 2015
Junior Member
Hello again,

I was just wondering what is the best approach for adding a customized table in ECP.

The view model Table Control is not sufficient, since the content of a cell should include more attributes, the columns name should represent the values of other attributes. Moreover the table should have other features like copy and paste row/column, reordering of rows/columns etc.
I saw that there is a TableControlSWTRenderer. Is it a good idea to start from it or should I create another renderer from scratch?

Thank you and regards,
Roxana
Re: [ECP] Table Custom Control [message #1725412 is a reply to message #1725161] Thu, 03 March 2016 11:06 Go to previous messageGo to next message
Johannes Faltermeier is currently offline Johannes FaltermeierFriend
Messages: 96
Registered: December 2013
Member

Hi Roxana

When the Table Control View Model is not sufficient for your requirement you can use a Custom Control (http://eclipsesource.com/blogs/tutorials/emf-forms-view-model-elements/#customcontrols).
Since the 1.8 release of EMFForms, the TableRenderer you are mentioning is using a new feature: the org.eclipse.emfforms.spi.swt.table.TableViewerFactory
This class and the associated TableViewerSWTBuilder decouple a lot the code from the renderer from the table control view model element. So I think you should check out this util as well.

Cheers
Johannes


Johannes Faltermeier

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [ECP] Table Custom Control [message #1725536 is a reply to message #1725412] Fri, 04 March 2016 08:53 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

second note on this:
Instead of implementing a custom control, you can of course also adapt
the table renderer or implement a custom table renderer. In most cases,
I would probably prefer this option. It depends a little bit on your use
case, though.

Best regards

Jonas



Am 03.03.2016 um 12:06 schrieb Johannes Faltermeier:
> Hi Roxana
>
> When the Table Control View Model is not sufficient for your requirement
> you can use a Custom Control
> (http://eclipsesource.com/blogs/tutorials/emf-forms-view-model-elements/#customcontrols).
> Since the 1.8 release of EMFForms, the TableRenderer you are mentioning
> is using a new feature: the
> org.eclipse.emfforms.spi.swt.table.TableViewerFactory
> This class and the associated TableViewerSWTBuilder decouple a lot the
> code from the renderer from the table control view model element. So I
> think you should check out this util as well.
> Cheers
> Johannes


--
--

Jonas Helming

Get professional Eclipse developer support:

http://eclipsesource.com/en/services/developer-support/
Re: [ECP] Table Custom Control [message #1725561 is a reply to message #1725536] Fri, 04 March 2016 12:42 Go to previous message
Roxana Paun is currently offline Roxana PaunFriend
Messages: 7
Registered: October 2015
Junior Member
Hi,

Ok. Thank you both, Johannes ans Jonas, for the responses.

Roxana

Previous Topic:[Edapt] Loading Resource in a Release other than the first one fails
Next Topic:Bugs: collabsible Groups
Goto Forum:
  


Current Time: Tue Mar 31 03:15:08 GMT 2020

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

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

Back to the top