JTree.setLargeModel(boolean)

J

Jason Cavett

What is the purpose of JTree.setLargeModel(boolean)? I figured it had
something to do with a large tree model underlying the JTree
(performance improvement or something). Am I right? If so, what is
considered a "large tree model." Are there any disadvantages to
setting this if you have a small tree model?


Thanks
 
A

Alexander.V.Kasatkin

What is the purpose of JTree.setLargeModel(boolean)? šI figured it had
something to do with a large tree model underlying the JTree
(performance improvement or something). šAm I right? šIf so, what is
considered a "large tree model." šAre there any disadvantages to
setting this if you have a small tree model?

The JTree.LargetModel property affects only if the JTree.RowHeight
property is set to positive value.
The main idea that, if model contains too many nodes, to paint all
tree rows with the same height.
Otherwise, heights of each row would be truly calculated using a tree
node renderer and stored into the cache in the BasicTreeUI class.

BR, Alex.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top