Java Reference
In-Depth Information
Table 17-1. JTree Properties (Continued)
Property Name
Data Type
Access
leadSelectionRow
int
Read-only
maxSelectionRow
int
Read-only
minSelectionRow
int
Read-only
model
TreeModel
Read-write bound
preferredScrollableViewportSize
Dimension
Read-only
rootVisible
boolean
Read-write bound
rowCount
int
Read-only
rowHeight
int
Read-write bound
scrollableTracksViewportHeight
boolean
Read-only
scrollableTracksViewportWidth
boolean
Read-only
scrollsOnExpand
boolean
Read-write bound
selectionCount
int
Read-only
selectionEmpty
boolean
Read-only
selectionModel
TreeSelectionModel
Read-write bound
selectionPath
TreePath
Read-write
selectionPaths
TreePath[ ]
Read-write
selectionRow
int
Write-only
selectionRows
int[ ]
Read-write
showsRootHandles
boolean
Read-write bound
toggleClickCount
int
Read-write bound
treeExpansionListeners
TreeExpansionListener[ ]
Read-only
treeSelectionListeners
TreeSelectionListener[ ]
Read-only
treeWillExpandListeners
TreeWillExpandListener[ ]
Read-only
UI
TreeUI
Read-write
UIClassID
String
Read-only
visibleRowCount
int
Read-write bound
Some JTree properties are closely interrelated. For instance, when the rowHeight property
is positive, it means that the node at each row is displayed with a fixed height, no matter what size
the nodes within the tree should be. When the rowHeight property is negative, the cellRenderer
property determines the rowHeight . So, the value of rowHeight determines the setting of the
 
Search WWH ::




Custom Search