src/share/classes/javax/swing/tree/DefaultTreeModel.java

Print this page




  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javax.swing.tree;
  27 
  28 import java.util.*;
  29 import java.beans.ConstructorProperties;
  30 import java.io.*;
  31 import javax.swing.event.*;
  32 
  33 /**
  34  * A simple tree data model that uses TreeNodes.
  35  * For further information and examples that use DefaultTreeModel,
  36  * see <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
  37  * in <em>The Java Tutorial.</em>
  38  * <p>
  39  * <strong>Warning:</strong>
  40  * Serialized objects of this class will not be compatible with
  41  * future Swing releases. The current serialization support is
  42  * appropriate for short term storage or RMI between applications running
  43  * the same version of Swing.  As of 1.4, support for long term storage
  44  * of all JavaBeans&trade;
  45  * has been added to the <code>java.beans</code> package.
  46  * Please see {@link java.beans.XMLEncoder}.
  47  *
  48  * @author Rob Davis
  49  * @author Ray Ryan
  50  * @author Scott Violet
  51  */
  52 public class DefaultTreeModel implements Serializable, TreeModel {
  53     /** Root of the tree. */
  54     protected TreeNode root;
  55     /** Listeners. */
  56     protected EventListenerList listenerList = new EventListenerList();




  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javax.swing.tree;
  27 
  28 import java.util.*;
  29 import java.beans.ConstructorProperties;
  30 import java.io.*;
  31 import javax.swing.event.*;
  32 
  33 /**
  34  * A simple tree data model that uses TreeNodes.
  35  * For further information and examples that use DefaultTreeModel,
  36  * see <a href="https://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
  37  * in <em>The Java Tutorial.</em>
  38  * <p>
  39  * <strong>Warning:</strong>
  40  * Serialized objects of this class will not be compatible with
  41  * future Swing releases. The current serialization support is
  42  * appropriate for short term storage or RMI between applications running
  43  * the same version of Swing.  As of 1.4, support for long term storage
  44  * of all JavaBeans&trade;
  45  * has been added to the <code>java.beans</code> package.
  46  * Please see {@link java.beans.XMLEncoder}.
  47  *
  48  * @author Rob Davis
  49  * @author Ray Ryan
  50  * @author Scott Violet
  51  */
  52 public class DefaultTreeModel implements Serializable, TreeModel {
  53     /** Root of the tree. */
  54     protected TreeNode root;
  55     /** Listeners. */
  56     protected EventListenerList listenerList = new EventListenerList();