Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » can treegrid be edit as nebula?
can treegrid be edit as nebula? [message #930428] Tue, 02 October 2012 09:56 Go to next message
cheng shouwu is currently offline cheng shouwuFriend
Messages: 12
Registered: September 2012
Junior Member
Hi park:

thanks for your work on nattable;

I have ever used nattable in my two project,and now we want to use it in my new project,I have some question about it

1.can the nattable display tree like nebula GridTreeViewer? including tree line,editing?

2,after I saw the examples of nattable-0.9.0,the nattable have added the multiline text of the cell,it is the feature i like.

3,I do not want use nebula for it can not binding data,it seems that nattable can not do that too,but it can interact the data between thd model and view,is that true?is there otherthings we have to do for that?

4,when edit the text in cell ,the text will be in the center of cell ,how to make it on the left of the cell.

thanks a lot!

yours sincerely

chengshwu
Re: can treegrid be edit as nebula? [message #930516 is a reply to message #930428] Tue, 02 October 2012 11:45 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Hi,

although I'm not Edwin, I will answer your questions hopefully to your satisfaction. Smile

We really like to hear that NatTable is used in various projects. We should think about adding some page to our website where users can post. Something like "Friends of NatTable". Wink

1. I don't know what you mean with tree line editing. But NatTable supports displaying a tree structure. There are 2 examples in the Layers section: TreeGridExample and TreeGridWithCheckboxFieldsExample.

2. Yes the multiline text was added some versions ago, but was quite unstable before the Nebula release. Now it should work fine.

3. NatTable doesn't support JFace databinding. This is because you are creating a DataProvider or ColumnPropertyAccessor, that normally directly modifies the data model when modified within the NatTable. Therefore databinding doesn't make sense with the current architecture of the NatTable. So for the interaction you only have to implement a specific DataProvider or ColumnPropertyAccessor so the modifications in the NatTable are translated to the model the way you like.

4. To modify the alignment or any other style in your NatTable, you use Style objects and configurations. The following snippet will set the text alignment on editing for cells with the label EditErrorHandlingExample.COLUMN_TWO_LABEL to be left aligned.
Style cellStyle = new Style();
cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, HorizontalAlignmentEnum.LEFT);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle, DisplayMode.EDIT, EditErrorHandlingExample.COLUMN_TWO_LABEL);


Hope these informations help.

Greez,
Dirk
Re: can treegrid be edit as nebula? [message #930621 is a reply to message #930516] Tue, 02 October 2012 13:48 Go to previous messageGo to next message
cheng shouwu is currently offline cheng shouwuFriend
Messages: 12
Registered: September 2012
Junior Member
thanks a lot for your quickly reply!
Re: can treegrid be edit as nebula? [message #931859 is a reply to message #930621] Wed, 03 October 2012 15:36 Go to previous messageGo to next message
cheng shouwu is currently offline cheng shouwuFriend
Messages: 12
Registered: September 2012
Junior Member
Hi Dirk:

in my new project,the treegird is the main viewer,there are many operations on them.so I have to ask for you to confirm some questions:

1,according to the operation habit,is there tree line in the treegrid?there is an image to show what is treeline

|--
|--
|--
|--
|--
| |--
| |--

2,can the treegrid be edited as grid?including validate,configurations?


I have to say ,the nattable is more powerful than nebula,but alos it is so complex to use.
Re: can treegrid be edit as nebula? [message #931868 is a reply to message #931859] Wed, 03 October 2012 15:47 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Hi,

1. I'm not sure if I understand what you mean with treeline. The tree structure is build in the first column of the grid. AFAIK it is not possible to break that into several columns. If it is this what you mean...

2. Yes of course it is possible to enable editing for tree grids. In fact I haven't ever tried to edit the tree structure column. But allowing to edit the tree column, which would mean to allow editing the tree structure on the fly, I guess it doesn't work. This is also related to some issues in GlazedLists itself, but that's another story. Wink Usually it would be not a so good idea to let a user modify the tree structure within the tree on the fly.

Yes the NatTable is quite powerful, and yes it became quite complex to use. But we are working on making it easier to configure and build a NatTable. It will take a while to get it working, so don't expect it in the near future, but we are aware of it. Smile

Greez,
Dirk
Re: can treegrid be edit as nebula? [message #947004 is a reply to message #930428] Tue, 16 October 2012 18:22 Go to previous message
Jay Norwood is currently offline Jay NorwoodFriend
Messages: 155
Registered: July 2009
Senior Member
I tried out the eclipse emf.facet project, which has a nattable based widget which was very nice. Their approach was to allow you to select the data to display from any emf model, then they create a separate table model resource that has all the nattable attributes that you choose. It worked very well. I didn't see an example that used a tree provider, but the grid worked well, and supplies editing of the cells that is applied back to your referenced model instance.

[Updated on: Tue, 16 October 2012 18:24]

Report message to a moderator

Previous Topic:Division by Zero bug in AbstractTextPainter.modifyTextToDisplay(AbstractTextPainter.java:325)
Next Topic:NatTable TreeGridExample cell styling
Goto Forum:
  


Current Time: Tue Apr 23 10:58:46 GMT 2024

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

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

Back to the top