KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > formview > displayer > Attribute


1 package net.sourceforge.formview.displayer;
2
3 /**
4  * Description : Attribute loaded with displayers-config.xml
5  * XML file. This class describe attribute of HTML element
6  * (eg : maxlength="50" into input HTML).
7  *
8  * @version 1.0.0
9  * @author <a HREF="mailto:angelo.zerr@gmail.com">Angelo ZERR</a>
10  *
11  */

12 public class Attribute {
13
14     private String JavaDoc name;
15     private String JavaDoc value;
16     
17     /**
18      * Get Name of Attribute (eg : name=maxlength
19      * for maxlength="50").
20      * @return value of Attribute
21      */

22     public String JavaDoc getName() {
23         return name;
24     }
25     /**
26      * Set Name of Attribute (eg : name=maxlength
27      * for maxlength="50").
28      * @param name of Attribute
29      */

30     public void setName(String JavaDoc name) {
31         this.name = name;
32     }
33     
34     /**
35      * Get Value of Attribute (eg : value=50
36      * for maxlength="50").
37      * @return value of Attribute
38      */

39     public String JavaDoc getValue() {
40         return value;
41     }
42     
43     /**
44      * Set Value of Attribute (eg : value=50
45      * for maxlength="50").
46      * @param name of Attribute
47      */

48     public void setValue(String JavaDoc value) {
49         this.value = value;
50     }
51     
52     public String JavaDoc toString() {
53         StringBuffer JavaDoc results = new StringBuffer JavaDoc();
54         results.append("\t\t\tname = " + name + "\n");
55         results.append("\t\t\tvalue = " + value + "\n");
56         return results.toString();
57     }
58
59 }
60
Popular Tags