Questions tagged [treemodel]

109 questions
0
votes
1 answer

DefaultMutableTreeNode inbuilt tree structure

How can I access userObject in DefaultMutableTreeNode How can I modify the user object or extract the values defined in it?
Shark
  • 11
  • 2
0
votes
1 answer

example/tutorial for using TreeModel+AbstractTreeModel?

I have a database containing a hierarchy that I want to display within a JTree. Is there a good example/tutorial for TreeModel and/or AbstractTreeModel that explains how to implement a custom treemodel? I'm going through a lot of head-scratching and…
Jason S
  • 184,598
  • 164
  • 608
  • 970
0
votes
2 answers

Java Custom TreeModel: Using treeStructureChanged()

I've built a custom TreeModel for my Java application and, as part of that, have set up my model to fire TreeModelListener events. The docs say to call treeStructureChanged() when the tree has drastically changed structure from a node down but I'm…
Firenze
  • 308
  • 1
  • 9
-1
votes
1 answer

treemodel js - how to get nest level while walking the tree

Api does not provide any information how deep we are in the tree while walking. Do You have any ideas how to get such information? root.walk(function (node) { console.log('Nesting level' + node.??) });
Klay
  • 83
  • 1
  • 3
1 2 3 4 5 6 7
8