KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > panoptes > model > node > NodeDescriptor


1 package net.sf.panoptes.model.node;
2
3 /**
4  * NodeDescriptor.java
5  *
6  * Wrapper class for the name and description of a <code>NodeSupport</code>
7  *
8  * @author <a HREF="mailto:dag@liodden.no"</a>
9  * @version 0.1
10  * @see NodeSupport
11  */

12
13 public final class NodeDescriptor {
14     /**
15      * The name of the node
16      */

17     private String JavaDoc name;
18     
19     /**
20      * The description of the node
21      */

22     private String JavaDoc description;
23
24     private String JavaDoc iconName;
25
26     public NodeDescriptor() {
27         this.name = "Unnamed";
28         this.description = "No description";
29         this.iconName = Node.ICON_DEFAULT;
30     }
31
32     public NodeDescriptor(String JavaDoc name, String JavaDoc description, String JavaDoc iconName) {
33         this.name = name;
34         this.description = description;
35         this.iconName = iconName;
36     }
37     
38     /**
39      * Gets the name
40      *
41      * @return String the name
42      */

43     public String JavaDoc getName() {
44         return name;
45     }
46
47     /**
48      * Gets the description
49      *
50      * @return String the description
51      */

52     public String JavaDoc getDescription() {
53         return description;
54     }
55     
56     public String JavaDoc getIconName() {
57         return iconName;
58     }
59     /**
60      * @param description
61      */

62     public void setDescription(String JavaDoc description) {
63         this.description = description;
64     }
65
66     /**
67      * @param iconName
68      */

69     public void setIconName(String JavaDoc iconName) {
70         this.iconName = iconName;
71     }
72
73     /**
74      * @param name
75      */

76     public void setName(String JavaDoc name) {
77         this.name = name;
78     }
79     
80     public String JavaDoc toString() {
81         return getName() + " - " + getDescription();
82     }
83 }
84
Popular Tags