Re: JTreeTable
Tor Norbye <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.tasklist.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 30 Jan 2003, Tim Lebedkov wrote: | Hi Tor, | | > | > I think approaching openide and getting the TreeTableView changes is the | > best approach. The TreeTableView is used in many other places (debugger, | > module manager, etc.) so it would be bad to fix this locally, not | > globally. | | I tryed to solve http://tasklist.netbeans.org/issues/show_bug.cgi?id=27670. | It is very complicated to do this using nodes. | The main problem is that after recreating the whole tree we lose node | selection/open state. Ok. But it's only a P4 bug, so probably not enough to justify this. (By the way, I've solved the selection/open state problem in the suggestions module. Turns out that TreeView has an isExpanded method as well as a setExpanded (or something like that). So it should be possible to preserve expansion state when recreating a tree. The trick is creating nodes in an expanded state. See the hack in SuggestionsView for doing that.) | > We still need to Node APIs for getting property sheets etc. to work | > correctly. | | TopComponent.setActivatedNodes(task.createNodes()) could be used to get | property sheets and other nodes | related things working | | > It would however be nice to be able to create the nodes | > lazily (much like the way the table model allows you to only provide | > values for those rows that are visible in the table). So, instead of | > having to create all the children of the root node right away, it | > could ask for children in chunks. If we're only creating nodes for | > the visible rows, we're not going to consume very many resources at | > all. | | Filter is based on nodes (not on the tasks) so we need to create all levels | of nodes although | they are not visible. That's true, but I'm assuming filtering is the exception rather than the rule. Similarly, if sorting is done based on the nodes they would have to be created up front. | > And it would allow most of the APIs to stay the same. The Children | > API would have to be changed in openide to allow dynamic node requests | > however. | > | > I think it would be a good idea to make your proposal to nbdev, | > since it involves some API changes, and affects multiple modules. So do you want to write up a proposal? I've noticed Jesse is now reading dev@tasklist through the newsgroup - and he will likely have something to say about this. -- Tor