
CHAPTER 34
Thejavax.swing.tree Package
The javax.swing .tree package defines classes and interfaces used with the
javax.swing .JTree component. The TreeModel inter face defines the data to be displayed
by a JTree component. DefaultTreeModel pr ovides a commonly used implementation
of this interface; it is implemented in terms of the TreeNode and MutableTreeNode
inter faces. The TreeCellRenderer and TreeCellEditor inter faces ar e implemented by
objects that can display or edit cells in the tree, using a Swing component as a
template. Figure 34-1 shows the class hierarchy of this package. See Chapter 3,
Swing Programming Topics, for a discussion of and example using JTree and the
javax.swing .tree package.
AbstractLayoutCache Ja va 1.2
javax.swing .tree
This abstract class defines the methods that must be implemented by a class that wants
to cache a JTree layout. This class is used by the JTree UI delegate. Applications never
need to use or subclass this class.
public abstract class AbstractLayoutCache implements RowMapper {
// Public Constructors
public AbstractLayoutCache();
// Inner Classes
public abstract static class NodeDimensions;
// Property Accessor Methods (by property name)
public TreeModel getModel();
public void setModel(T reeModel newModel);
public AbstractLayoutCache.NodeDimensions getNodeDimensions();
public void setNodeDimensions(AbstractLayoutCache.NodeDimensions nd);
public int getPrefer ...