can treegrid be edit as nebula? [message #930428] |
Tue, 02 October 2012 09:56 |
cheng shouwu 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 |
Dirk Fauth Messages: 2903 Registered: July 2012 |
Senior Member |
|
|
Hi,
although I'm not Edwin, I will answer your questions hopefully to your satisfaction.
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".
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 #947004 is a reply to message #930428] |
Tue, 16 October 2012 18:22 |
Jay Norwood 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
|
|
|
Powered by
FUDForum. Page generated in 0.03808 seconds