KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > csdl > jblanket > app > tree > Node


1 package csdl.jblanket.app.tree;
2
3 import javax.swing.tree.DefaultMutableTreeNode JavaDoc;
4
5 /**
6  * Implements the Nodes that do not represent methods.
7  *
8  * @author Joy M. Agustin
9  * @version $Id: Node.java,v 1.1 2004/11/07 00:32:40 timshadel Exp $
10  */

11 public class Node extends DefaultMutableTreeNode JavaDoc {
12   
13   /** Name of the node */
14   private String JavaDoc name;
15
16   /**
17    * Constructs a new <code>Node</code> object.
18    *
19    * @param name the name of this <code>Node</code>.
20    */

21   public Node(String JavaDoc name) {
22     super(name);
23     this.name = name;
24   }
25   
26   /**
27    * Gets the String representation of this Node. It includes the name of this Node.
28    *
29    * @return the String representation of this Node.
30    */

31   public String JavaDoc toString() {
32     return name;
33   }
34 }
Popular Tags