Serialized Form

Class javax.swing.JTree implements Serializable

Serialization Methods

readObject

private void readObject(java.io.ObjectInputStream s)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException

writeObject

private void writeObject(java.io.ObjectOutputStream s)
                  throws java.io.IOException
Serialized Fields

editable

boolean editable
Is the tree editable? Default is false.

invokesStopCellEditing

boolean invokesStopCellEditing
If true, when editing is to be stopped by way of selection changing, data in tree changing or other means stopCellEditing is invoked, and changes are saved. If false, cancelCellEditing is invoked, and changes are discarded. Default is false.

largeModel

boolean largeModel
Is this tree a large model? This is a code-optimization setting. A large model can be used when the cell height is the same for all nodes. The UI will then cache very little information and instead continually message the model. Without a large model the UI caches most of the information, resulting in fewer method calls to the model.

This value is only a suggestion to the UI. Not all UIs will take advantage of it. Default value is false.


rootVisible

boolean rootVisible
True if the root node is displayed, false if its children are the highest visible nodes.

rowHeight

int rowHeight
Height to use for each display row. If this is <= 0 the renderer determines the height for each row.

scrollsOnExpand

boolean scrollsOnExpand
If true, when a node is expanded, as many of the descendants are scrolled to be visible.

showsRootHandles

boolean showsRootHandles
True if handles are displayed at the topmost level of the tree.

A handle is a small icon that displays adjacent to the node which allows the user to click once to expand or collapse the node. A common interface shows a plus sign (+) for a node which can be expanded and a minus sign (-) for a node which can be collapsed. Handles are always shown for nodes below the topmost level.

If the rootVisible setting specifies that the root node is to be displayed, then that is the only node at the topmost level. If the root node is not displayed, then all of its children are at the topmost level of the tree. Handles are always displayed for nodes other than the topmost.

If the root node isn't visible, it is generally a good to make this value true. Otherwise, the tree looks exactly like a list, and users may not know that the "list entries" are actually tree nodes.

See Also:
#rootVisible

toggleClickCount

int toggleClickCount
Number of mouse clicks before a node is expanded.

visibleRowCount

int visibleRowCount
Number of rows to make visible at one time. This value is used for the Scrollable interface. It determines the preferred size of the display area.


Class javax.swing.JTree.DynamicUtilTreeNode implements Serializable

Serialized Fields

childValue

java.lang.Object childValue
Value to create children with.

hasChildren

boolean hasChildren

loadedChildren

boolean loadedChildren