NatTable a suitable widget for my application? [message #1750883] |
Sat, 31 December 2016 01:43 |
|
Hi,
I'm trying to figure out whether I should make use of NatTable as widget for my application.
Basically, I'm looking into implementing a table-based editor of span data. The table's input will usually be a single row with n columns. I need to be able to:
- Add columns dynamically (I know this is possible, seen it at DynamicColumnExample). I also need to be able to add new columns at a certain position (say, before or after a selected column). Is this possible? I'd think so, without having had a deep look at the example's source code...
- Add rows dynamically above, say, the selected row. I also guess that this is possible?
- Define spans over arbitrary n cells dynamically, is this possible? E.g., select a number of adjacent cells in a row, then fire a command (keybinding/button), then the cells get merged. Is there an example for this somewhere?
Finally, I guess that because I'd need to be able to save the changes I make, adding the NatTable widget to a 3.7-based EditorPart is the way to go, yes?
Many thanks for any insights!
Cheers
Stephan
[Updated on: Sat, 31 December 2016 01:44] Report message to a moderator
|
|
|
|
Re: NatTable a suitable widget for my application? [message #1750896 is a reply to message #1750893] |
Sat, 31 December 2016 16:17 |
|
Hi Dirk,
Thanks very much for the prompt reply. I'll look into your suggestions.
As for my last question, I guess at its core is the question of (manual) databinding, i.e., I want the table to sync with the state of my data model, so that changes in the table are passed on directly to the data model. Is there an example (possibly within the Examples app (which I cannot access at the moment as I'm away from my desk)) that does just that?
Vice versa (i.e., syncing table with changes in the model) isn't that much of an issue as I don't expect changes to the underlying data model while the table is worked on. Although it'd be interesting to know how this could be made to work as well of course .
Thanks!
Stephan
|
|
|
|
Re: NatTable a suitable widget for my application? [message #1751130 is a reply to message #1750897] |
Wed, 04 January 2017 17:49 |
|
Thanks very much, Dirk. This has been a lot of help already.
Quote:EDIT: I have solved the below issue already by overriding some default classes!
I have another question though: I'm currently going through the Default NatTable example to see what I can re-use. I'm looking at column headers right now.
My problem is, that my data model (at the moment) is a list of Objects which don't have properties as such, and hence I cannot simply map properties to labels as in the example. Instead, the values for the cells are calculated object by object. The objects themselves are a set of specific nodes in a graph, and I'm calculating values, e.g., by looking at outgoing relations and their target nodes.
How would I be able to set the column headers to a specific value that isn't simply "embedded" in the objects themselves?
Thanks!
Stephan
[Updated on: Wed, 04 January 2017 18:24] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03911 seconds