Java Reference
In-Depth Information
window on the left, the
soccer
node is at level 2 and row 8. When the
colors
node is closed, as
in the window on the right, the
soccer
node remains on level 2 but moves to row 4, because the
blue
,
violet
,
red
, and
yellow
rows are no longer visible.
Figure 17-3.
Rows versus levels of a tree
JTree Properties
Table 17-1 lists the 40 specific properties of
JTree
. You will explore many of these as you look at
the different classes that make up
JTree
.
Table 17-1.
JTree Properties
Property Name
Data Type
Access
accessibleContext
AccessibleContext
Read-only
anchorSelectionPath
TreePath
Read-write bound
cellEditor
TreeCellEditor
Read-write bound
cellRenderer
TreeCellRenderer
Read-write bound
dragEnabled
boolean
Read-write
editable
boolean
Read-write bound
editing
boolean
Read-only
editingPath
TreePath
Read-only
expandsSelectedPath
boolean
Read-write bound
fixedRowHeight
boolean
Read-only
invokesStopCellEditing
boolean
Read-write bound
largeModel
boolean
Read-write bound
lastSelectedPathComponent
Object
Read-only
leadSelectionPath
TreePath
Read-write bound