1   /*
2    * Copyright 2004-2008 the Seasar Foundation and the Others.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
13   * either express or implied. See the License for the specific language
14   * governing permissions and limitations under the License.
15   */
16  package org.seasar.uruma.renderer;
17  
18  import static org.seasar.uruma.annotation.RenderingPolicy.ConversionType.ACCELERATOR;
19  import static org.seasar.uruma.annotation.RenderingPolicy.ConversionType.BOOLEAN;
20  import static org.seasar.uruma.annotation.RenderingPolicy.ConversionType.CHAR;
21  import static org.seasar.uruma.annotation.RenderingPolicy.ConversionType.COLOR;
22  import static org.seasar.uruma.annotation.RenderingPolicy.ConversionType.IMAGE;
23  import static org.seasar.uruma.annotation.RenderingPolicy.ConversionType.INT;
24  import static org.seasar.uruma.annotation.RenderingPolicy.ConversionType.INT_ARRAY;
25  import static org.seasar.uruma.annotation.RenderingPolicy.ConversionType.STRING;
26  import static org.seasar.uruma.annotation.RenderingPolicy.ConversionType.SWT_CONST;
27  import static org.seasar.uruma.annotation.RenderingPolicy.ConversionType.TEXT;
28  import static org.seasar.uruma.annotation.RenderingPolicy.TargetType.FIELD;
29  import static org.seasar.uruma.annotation.RenderingPolicy.TargetType.NONE;
30  
31  import org.seasar.uruma.component.base.AbstractUIElement;
32  import org.seasar.uruma.annotation.RenderingPolicy;
33  
34  /**
35   * {@link RendererSupportUtil} のテストのためのクラスです。<br />
36   * 
37   * @author y-komori
38   */
39  public class SrcObject extends AbstractUIElement {
40  
41      @RenderingPolicy(targetType = NONE)
42      private String nonTargetField = "NonTarget";
43  
44      @RenderingPolicy(targetType = FIELD, conversionType = STRING)
45      private String stringField = "StringField1";
46  
47      @RenderingPolicy(targetType = FIELD, conversionType = TEXT)
48      private String textField = "Text\\tField1\\nText\\tField1\\n";
49  
50      @RenderingPolicy(targetType = FIELD, conversionType = INT)
51      private String intField = "123";
52  
53      @RenderingPolicy(targetType = FIELD, conversionType = INT_ARRAY)
54      private String intArrayField = "1, 2, 3";
55  
56      @RenderingPolicy(targetType = FIELD, conversionType = BOOLEAN)
57      private String booleanField = "true";
58  
59      @RenderingPolicy(targetType = FIELD, conversionType = COLOR)
60      private String colorField = "#FFFFFF";
61  
62      @RenderingPolicy(targetType = FIELD, conversionType = SWT_CONST)
63      private String swtConstField = "YES";
64  
65      @RenderingPolicy(targetType = FIELD, conversionType = IMAGE)
66      private String imageField = "/images/container.gif";
67  
68      @RenderingPolicy(targetType = FIELD, conversionType = ACCELERATOR)
69      private String acceleratorField = "Ctrl+Alt+A";
70  
71      @RenderingPolicy(targetType = FIELD, conversionType = CHAR)
72      private String charField = "A";
73  
74      @RenderingPolicy(conversionType = STRING)
75      private String stringProperty = "StringField2";
76  
77      @RenderingPolicy(conversionType = TEXT)
78      private String textProperty = "Text\\tField2\\nText\\tField2\\n";
79  
80      @RenderingPolicy(conversionType = INT)
81      private String intProperty = "456";
82  
83      @RenderingPolicy(conversionType = INT_ARRAY)
84      private String intArrayProperty = "3";
85  
86      @RenderingPolicy(conversionType = BOOLEAN)
87      private String booleanProperty = "false";
88  
89      @RenderingPolicy(conversionType = COLOR)
90      private String colorProperty = "#000000";
91  
92      @RenderingPolicy(conversionType = SWT_CONST)
93      private String swtConstProperty = "NO";
94  
95      @RenderingPolicy(conversionType = IMAGE)
96      private String imageProperty = "../../../../images/container.gif";
97  
98      @RenderingPolicy(conversionType = ACCELERATOR)
99      private String acceleratorProperty = "F2";
100 
101     @RenderingPolicy(conversionType = CHAR)
102     private String charProperty = "x";
103 
104     public String getNonTargetField() {
105         return this.nonTargetField;
106     }
107 
108     public String getBooleanField() {
109         return this.booleanField;
110     }
111 
112     public String getBooleanProperty() {
113         return this.booleanProperty;
114     }
115 
116     public String getColorField() {
117         return this.colorField;
118     }
119 
120     public String getColorProperty() {
121         return this.colorProperty;
122     }
123 
124     public String getIntField() {
125         return this.intField;
126     }
127 
128     public String getIntProperty() {
129         return this.intProperty;
130     }
131 
132     public String getIntArrayField() {
133         return this.intArrayField;
134     }
135 
136     public String getIntArrayProperty() {
137         return this.intArrayProperty;
138     }
139 
140     public String getStringField() {
141         return this.stringField;
142     }
143 
144     public String getStringProperty() {
145         return this.stringProperty;
146     }
147 
148     public String getSwtConstField() {
149         return this.swtConstField;
150     }
151 
152     public String getSwtConstProperty() {
153         return this.swtConstProperty;
154     }
155 
156     public String getTextField() {
157         return this.textField;
158     }
159 
160     public String getTextProperty() {
161         return this.textProperty;
162     }
163 
164     public String getImageField() {
165         return this.imageField;
166     }
167 
168     public String getImageProperty() {
169         return this.imageProperty;
170     }
171 
172     public String getAcceleratorField() {
173         return this.acceleratorField;
174     }
175 
176     public String getAcceleratorProperty() {
177         return this.acceleratorProperty;
178     }
179 
180     public String getCharField() {
181         return this.charField;
182     }
183 
184     public String getCharProperty() {
185         return this.charProperty;
186     }
187 
188 }