Update to Table control, now it can do Tree and TreeTable too

After a comment in another thread about a trees and tables, I thought I’d have a go at extending my Table control. Here is the result :slight_smile:

You can now add TableRow objects to other TableRow objects, allowing a tree to be created. Depending on the the number of columns you have, whether you have a single depth, and some options, the table will be rendered as a tree, a table, a tree table, or just a list.

The obligatory video …

[video]treetable - YouTube

The updated Table.java is here (the Javadoc has some examples of usage).

The updated table style (required for arrow icons) is here (and the atlas version here).

RR

5 Likes

i’ll certainly will use it for my editor!!! THANKS A LOT!

Sorry for the delay. This has been updated.

It is available via the repo or with tonight’s patch.

Thanks again @rockfire for the awesome work!

1 Like
@t0neg0d said: Sorry for the delay. This has been updated.

It is available via the repo or with tonight’s patch.

Thanks again @rockfire for the awesome work!

As ever you have nothing to apologise for. Thanks for getting this in :slight_smile:

RR

Started playing with the table in tree modes… looks to be what I was needing :).

Not a problem for me now, but may help people trying later:
The javadoc examples have twice: childRow.addRow(childRow), which should be parentRow.addRow(childRow) or an exception will occur.

Thx again to the two of you.

@loopies said: Started playing with the table in tree modes... looks to be what I was needing :).

Not a problem for me now, but may help people trying later:
The javadoc examples have twice: childRow.addRow(childRow), which should be parentRow.addRow(childRow) or an exception will occur.

Thx again to the two of you.

I’m looking forward to playing with this control as well. Wish I had had it available when I was throwing together the FX Builder thingy.

When I get back to that, I’m going to look into incorporating this into both the main emitter list & script window at a minimum. I’m sure there are many other places this would be useful as well.

Also @rockfire From the thread title it sounds like you can use this to just create a Tree View. I take it this is done by only adding a single column and no headers?

@t0neg0d said: I'm looking forward to playing with this control as well. Wish I had had it available when I was throwing together the FX Builder thingy.

When I get back to that, I’m going to look into incorporating this into both the main emitter list & script window at a minimum. I’m sure there are many other places this would be useful as well.

Also @rockfire From the thread title it sounds like you can use this to just create a Tree View. I take it this is done by only adding a single column and no headers?

Nice, look forward to seeing it in there :slight_smile:

And Yup, thats exactly how you do it.

EDIT: oh good call on the javadoc error :facepalm:

1 Like