KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > albel > tags > table > model > Column


1 /*
2  * Column.java
3  *
4  * Created on Šeštadienis, 2004, Rugsėjo 4, 20.01
5  */

6
7 package albel.tags.table.model;
8
9 /**
10  *
11  * @author Albertas Laurinav
12  */

13 public class Column
14 {
15     
16     /**
17      * Holds value of property property.
18      */

19     private String JavaDoc property;
20     private Table table;
21     
22     /**
23      * Holds value of property type.
24      */

25     private ColumnType type;
26     
27     /**
28      * Holds value of property width.
29      */

30     private int width;
31     
32     /**
33      * Holds value of property header.
34      */

35     private ColumnHeader header=new ColumnHeader();
36     
37     /** Creates a new instance of Column */
38     private Column()
39     {
40     }
41     /** Creates a new instance of Column */
42     public Column(Table table)
43     {
44         this.table=table;
45     }
46     public Column(Table table,String JavaDoc property)
47     {
48         this.table=table;
49         this.property=property;
50     }
51     public Table getTable()
52     {
53         return table;
54     }
55     public boolean equals(Object JavaDoc o)
56     {
57         if(o==null || !(o instanceof Column))
58             return false;
59         return ((Column)o).getProperty().equals(getProperty());
60     }
61     
62     /**
63      * Getter for property property.
64      * @return Value of property property.
65      */

66     public String JavaDoc getProperty()
67     {
68         return this.property;
69     }
70     
71     /**
72      * Setter for property property.
73      * @param property New value of property property.
74      */

75     public void setProperty(String JavaDoc property)
76     {
77         this.property = property;
78     }
79     
80     /**
81      * Getter for property type.
82      * @return Value of property type.
83      */

84     public ColumnType getType()
85     {
86         return this.type;
87     }
88     
89     /**
90      * Setter for property type.
91      * @param type New value of property type.
92      */

93     public void setType(ColumnType type) throws TableTagException
94     {
95         this.type = type;
96     }
97     
98     /**
99      * Getter for property width.
100      * @return Value of property width.
101      */

102     public int getWidth()
103     {
104         return this.width;
105     }
106     
107     /**
108      * Setter for property width.
109      * @param width New value of property width.
110      */

111     public void setWidth(int width)
112     {
113         this.width = width;
114     }
115     
116     /**
117      * Getter for property header.
118      * @return Value of property header.
119      */

120     public ColumnHeader getHeader()
121     {
122         return this.header;
123     }
124     
125     /**
126      * Setter for property header.
127      * @param header New value of property header.
128      */

129     public void setHeader(ColumnHeader header)
130     {
131         this.header = header;
132     }
133     
134 }
135
Popular Tags