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