Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Ingo,
Sorry for my long inactivity this last year -- I've now improved the Tree-view design in a number of respects. TreeDemo contains examples of most of the desired use cases.
Internal/External model split. TreeModels are now either External (virtual descriptions of some arbitrary external structure) or Internal (an eagerly-initialised internally stored tree structure copied from some external structure).
A way to update, edit, add and remove nodes, for external and internal models. All models have update(), remove(), insertUnder(), insertAfter() and insertBefore() methods.
Using an internal representation gives you these for free, whereas an external model needs them provided with the makeUpdatableWith(), makeInsertableWith() and makeRemovableWith() methods.
Tree.Path is now IndexedSeq instead of List.
map and filter methods for TreeModels. Currently the ExternalTreeModel has to turn itself into an InternalTreeModel to do a map, which is not very satisfactory.
ListView has been integrated into the CellView abstraction. There is unfortunately a minor backwards-compat problem -- the componentFor method in existing subclasses of ListView.Renderer would need to be marked "override". I'm not sure how much of a problem this is, but this is as close as I can get without jettisoning the (IMHO beneficial) CellInfo abstraction.
The ListView integration is in a separate commit to the Tree stuff, so it can be safely left out if you think it's a bit hairy at this stage.
NB
Table hasn't been integrated yet; it can't have a straight renderer method, it needs to be per-row/column. I suspect that RenderableCells and EditableCells will have to be snipped or eliminated to fit Table into the system.