1   /*
2    * TestBean.java Created on May 3, 2001, 5:14 PM
3    */
4   
5   package nl.tudelft.dsol.introspection.beans;
6   
7   import java.awt.Font;
8   import java.util.logging.Logger;
9   
10  /***
11   * @author (c) 2003 <a href="http://www.tudelft.nl">Delft University of
12   *         Technology </a>, Delft, the Netherlands <br>
13   *         <a href="http://www.tbm.tudelft.nl">Faculty of Technology, Policy and
14   *         Management </a> <br>
15   *         <a href="http://www.sk.tbm.tudelft.nl">Department of System
16   *         Engineering </a> <br>
17   *         Main researcher : <a
18   *         href="http://www.tbm.tudelft.nl/webstaf/alexandv/">Dr. Ir. A.
19   *         Verbraeck <a/><br>
20   *         Assistant researchers <a href="http://www.peter-jacobs.com">Ir.
21   *         P.H.M. Jacobs </a> and <a
22   *         href="http://www.tbm.tudelft.nl/webstaf/nielsl">Ir. N.A. Lang </a>
23   */
24  public class TestBean extends java.lang.Object implements java.io.Serializable
25  {
26      /*** the error logger */
27      private static Logger logger = Logger
28              .getLogger("nl.tudelft.tbm.sk.introspection");
29  
30      /*** Holds value of property firstProperty. */
31      private String firstProperty = "First ;-)";
32  
33      /*** Holds value of property secondProperty. */
34      private String secondProperty = "Second ;-)";
35  
36      /*** Holds value of property intProp. */
37      private int intProp = 1717;
38  
39      /*** Holds value of property color. */
40      private java.awt.Color color = java.awt.Color.yellow;
41  
42      /*** Holds value of property font. */
43      private Font font = null;
44  
45      /*** Holds value of property subBean. */
46      private SubTestBean subBean = null;
47  
48      /*** Holds value of property testBean2. */
49      private SubTestBean2Interface testBean2 = new SubTestBean2();
50  
51      /*** Creates new TestBean */
52      public TestBean()
53      {
54          super();
55      }
56  
57      /***
58       * Getter for property firstProperty.
59       * 
60       * @return Value of property firstProperty.
61       */
62      public String getFirstProperty()
63      {
64          // logger.info(this + this.firstProperty + "requested.");
65          return this.firstProperty;
66      }
67  
68      /***
69       * Setter for property firstProperty.
70       * 
71       * @param firstProperty New value of property firstProperty.
72       */
73      public void setFirstProperty(String firstProperty)
74      {
75          logger.info(this + firstProperty + "set.");
76          this.firstProperty = firstProperty;
77      }
78  
79      /***
80       * Getter for property secondProperty.
81       * 
82       * @return Value of property secondProperty.
83       */
84      public String getSecondProperty()
85      {
86          // logger.info(this + this.secondProperty + "requested.");
87          return this.secondProperty;
88      }
89  
90      /***
91       * Setter for property secondProperty.
92       * 
93       * @param secondProperty New value of property secondProperty.
94       */
95      public void setSecondProperty(String secondProperty)
96      {
97          logger.info(this + secondProperty + "set.");
98          this.secondProperty = secondProperty;
99      }
100 
101     /***
102      * Getter for property intProp.
103      * 
104      * @return Value of property intProp.
105      */
106     public int getIntProp()
107     {
108         // logger.info(this +"" + this.intProp + "requested");
109         return this.intProp;
110     }
111 
112     /***
113      * Setter for property intProp.
114      * 
115      * @param intProp New value of property intProp.
116      */
117     public void setIntProp(int intProp)
118     {
119         logger.info(this + "intProp set to " + intProp);
120         this.intProp = intProp;
121     }
122 
123     /***
124      * Getter for property color.
125      * 
126      * @return Value of property color.
127      */
128     public java.awt.Color getColor()
129     {
130         return this.color;
131     }
132 
133     /***
134      * Setter for property color.
135      * 
136      * @param color New value of property color.
137      */
138     public void setColor(java.awt.Color color)
139     {
140         this.color = color;
141     }
142 
143     /***
144      * Getter for property font.
145      * 
146      * @return Value of property font.
147      */
148     public Font getFont()
149     {
150         return this.font;
151     }
152 
153     /***
154      * Setter for property font.
155      * 
156      * @param font New value of property font.
157      */
158     public void setFont(Font font)
159     {
160         this.font = font;
161     }
162 
163     /***
164      * Getter for property subBean.
165      * 
166      * @return Value of property subBean.
167      */
168     public SubTestBean getSubBean()
169     {
170         return this.subBean;
171     }
172 
173     /***
174      * Setter for property subBean.
175      * 
176      * @param subBean New value of property subBean.
177      */
178     public void setSubBean(SubTestBean subBean)
179     {
180         this.subBean = subBean;
181     }
182 
183     /***
184      * @see java.lang.Object#toString()
185      */
186     @Override
187     public String toString()
188     {
189         String result;
190         result = this.getColor() + this.getFirstProperty()
191                 + this.getSecondProperty() + this.getFont() + this.getIntProp();
192         return result;
193     }
194 
195     /***
196      * Getter for property testBean2.
197      * 
198      * @return Value of property testBean2.
199      */
200     public SubTestBean2Interface getTestBean2()
201     {
202         return this.testBean2;
203     }
204 
205     /***
206      * Setter for property testBean2.
207      * 
208      * @param testBean2 New value of property testBean2.
209      */
210     public void setTestBean2(SubTestBean2Interface testBean2)
211     {
212         this.testBean2 = testBean2;
213     }
214 }