> Another related scenario I ran into was this: > > I'm using your Pivot hashmap with change listeners (great idea). And as I'm > adding/removing/clearing the hashmap, the listeners reload a tree. Now when > I click on the treenode, it would be nice to "go back" to the hashmap to grab > more properties that the treenode is representing. Since the regular > treenodes are really hollow, I have to fall back to using the dictionaries my > custom treenodes to tie them back to the hashmap keys. > > I think it's less of a problem with tables, because you can have extra "data > columns/attributes" in the arraylist that are not visible in the view, to > store properties.
You can also do this with tree data - just not the default TreeNode and TreeBranch classes. You (currently) need to define your own data structure, or use the XML Element class. > Just an idea. I haven't wrapped my head around the renderers yet. I could > be misinformed in this area. I actually think renderers may be exactly what you are looking for. Take a look at the NodeRenderer class in the XML Viewer tool for an example: http://svn.apache.org/repos/asf/pivot/trunk/tools/src/org/apache/pivot/tools/xml/
