View Javadoc
1   // ---------- Attention: Generated code, please do not modify! -----------  
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one or more
5    * contributor license agreements.  See the NOTICE file distributed with
6    * this work for additional information regarding copyright ownership.
7    * The ASF licenses this file to You under the Apache License, Version 2.0
8    * (the "License"); you may not use this file except in compliance with
9    * the License.  You may obtain a copy of the License at
10   *
11   *      http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   */
19  
20  package org.apache.myfaces.tobago.component;
21  
22  import javax.faces.component.UIComponentBase;
23  import javax.faces.context.FacesContext;
24  import org.apache.myfaces.tobago.layout.Display;
25  import org.apache.myfaces.tobago.layout.Measure;
26  import org.apache.myfaces.tobago.layout.Overflow;
27  import org.apache.myfaces.tobago.layout.Position;
28  import org.apache.myfaces.tobago.layout.TextAlign;
29  import org.apache.myfaces.tobago.renderkit.css.CustomClass;
30  import org.apache.myfaces.tobago.internal.util.ArrayUtils;
31  import org.apache.myfaces.tobago.internal.util.StringUtils;
32  import org.apache.myfaces.tobago.internal.util.Deprecation;
33  import javax.el.ELException;
34  import javax.faces.FacesException;
35  import java.util.Arrays;
36  import java.util.ArrayList;
37  import java.util.Collection;
38  import java.util.List;
39  import javax.el.MethodExpression;
40  import javax.el.ValueExpression;
41  
42  /** 
43   <p>
44    Add a style tag with the given file name to the header (using file attribute) or add
45    some CSS styles to the parent component.
46    </p>
47    * UIComponent class, generated from template {@code component.stg} with class
48    * {@link org.apache.myfaces.tobago.internal.taglib.component.StyleTagDeclaration}.
49   */
50  public class UIStyle
51      extends UIComponentBase  {
52  
53    public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Style";
54  
55    public static final String COMPONENT_FAMILY = "org.apache.myfaces.tobago.Style";
56  
57  
58    enum PropertyKeys {
59      paddingRight,
60      minHeight,
61      marginRight,
62      file,
63      paddingBottom,
64      top,
65      maxHeight,
66      paddingTop,
67      height,
68      maxWidth,
69      textAlign,
70      bottom,
71      display,
72      minWidth,
73      right,
74      marginLeft,
75      overflowX,
76      overflowY,
77      left,
78      width,
79      customClass,
80      marginBottom,
81      position,
82      paddingLeft,
83      marginTop,
84    }
85  
86    public String getFamily() {
87      return COMPONENT_FAMILY;
88    }
89  
90  
91    public org.apache.myfaces.tobago.layout.Measure getPaddingRight() {
92      Object object = getStateHelper().eval(PropertyKeys.paddingRight);
93      if (object != null) {
94         return Measure.valueOf(object);
95      }
96      return null;
97    }
98  
99    public void setPaddingRight(org.apache.myfaces.tobago.layout.Measure paddingRight) {
100     getStateHelper().put(PropertyKeys.paddingRight, paddingRight);
101   }
102 
103   public org.apache.myfaces.tobago.layout.Measure getMinHeight() {
104     Object object = getStateHelper().eval(PropertyKeys.minHeight);
105     if (object != null) {
106        return Measure.valueOf(object);
107     }
108     return null;
109   }
110 
111   public void setMinHeight(org.apache.myfaces.tobago.layout.Measure minHeight) {
112     getStateHelper().put(PropertyKeys.minHeight, minHeight);
113   }
114 
115   public org.apache.myfaces.tobago.layout.Measure getMarginRight() {
116     Object object = getStateHelper().eval(PropertyKeys.marginRight);
117     if (object != null) {
118        return Measure.valueOf(object);
119     }
120     return null;
121   }
122 
123   public void setMarginRight(org.apache.myfaces.tobago.layout.Measure marginRight) {
124     getStateHelper().put(PropertyKeys.marginRight, marginRight);
125   }
126 
127   /**
128   Name of the stylesheet file to add to page. The name must be full qualified, or relative.
129    If using a complete path from root, you'll need to add the contextPath from the web application.
130    This can be done with the EL #{request.contextPath}.
131 
132   */
133   public java.lang.String getFile() {
134     return (java.lang.String) getStateHelper().eval(PropertyKeys.file);
135   }
136 
137   public void setFile(java.lang.String file) {
138     getStateHelper().put(PropertyKeys.file, file);
139   }
140 
141   public org.apache.myfaces.tobago.layout.Measure getPaddingBottom() {
142     Object object = getStateHelper().eval(PropertyKeys.paddingBottom);
143     if (object != null) {
144        return Measure.valueOf(object);
145     }
146     return null;
147   }
148 
149   public void setPaddingBottom(org.apache.myfaces.tobago.layout.Measure paddingBottom) {
150     getStateHelper().put(PropertyKeys.paddingBottom, paddingBottom);
151   }
152 
153   public org.apache.myfaces.tobago.layout.Measure getTop() {
154     Object object = getStateHelper().eval(PropertyKeys.top);
155     if (object != null) {
156        return Measure.valueOf(object);
157     }
158     return null;
159   }
160 
161   public void setTop(org.apache.myfaces.tobago.layout.Measure top) {
162     getStateHelper().put(PropertyKeys.top, top);
163   }
164 
165   public org.apache.myfaces.tobago.layout.Measure getMaxHeight() {
166     Object object = getStateHelper().eval(PropertyKeys.maxHeight);
167     if (object != null) {
168        return Measure.valueOf(object);
169     }
170     return null;
171   }
172 
173   public void setMaxHeight(org.apache.myfaces.tobago.layout.Measure maxHeight) {
174     getStateHelper().put(PropertyKeys.maxHeight, maxHeight);
175   }
176 
177   public org.apache.myfaces.tobago.layout.Measure getPaddingTop() {
178     Object object = getStateHelper().eval(PropertyKeys.paddingTop);
179     if (object != null) {
180        return Measure.valueOf(object);
181     }
182     return null;
183   }
184 
185   public void setPaddingTop(org.apache.myfaces.tobago.layout.Measure paddingTop) {
186     getStateHelper().put(PropertyKeys.paddingTop, paddingTop);
187   }
188 
189   public org.apache.myfaces.tobago.layout.Measure getHeight() {
190     Object object = getStateHelper().eval(PropertyKeys.height);
191     if (object != null) {
192        return Measure.valueOf(object);
193     }
194     return null;
195   }
196 
197   public void setHeight(org.apache.myfaces.tobago.layout.Measure height) {
198     getStateHelper().put(PropertyKeys.height, height);
199   }
200 
201   public org.apache.myfaces.tobago.layout.Measure getMaxWidth() {
202     Object object = getStateHelper().eval(PropertyKeys.maxWidth);
203     if (object != null) {
204        return Measure.valueOf(object);
205     }
206     return null;
207   }
208 
209   public void setMaxWidth(org.apache.myfaces.tobago.layout.Measure maxWidth) {
210     getStateHelper().put(PropertyKeys.maxWidth, maxWidth);
211   }
212 
213   /**
214   The alignment of the elements inside of the container, possible values are:
215    {
216   <br>Allowed Values: <code>left,right,center,justify</code>
217   */
218   public org.apache.myfaces.tobago.layout.TextAlign getTextAlign() {
219     return (org.apache.myfaces.tobago.layout.TextAlign) getStateHelper().eval(PropertyKeys.textAlign);
220   }
221 
222   public void setTextAlign(org.apache.myfaces.tobago.layout.TextAlign textAlign) {
223     getStateHelper().put(PropertyKeys.textAlign, textAlign);
224   }
225 
226   public org.apache.myfaces.tobago.layout.Measure getBottom() {
227     Object object = getStateHelper().eval(PropertyKeys.bottom);
228     if (object != null) {
229        return Measure.valueOf(object);
230     }
231     return null;
232   }
233 
234   public void setBottom(org.apache.myfaces.tobago.layout.Measure bottom) {
235     getStateHelper().put(PropertyKeys.bottom, bottom);
236   }
237 
238   public org.apache.myfaces.tobago.layout.Display getDisplay() {
239     return (org.apache.myfaces.tobago.layout.Display) getStateHelper().eval(PropertyKeys.display);
240   }
241 
242   public void setDisplay(org.apache.myfaces.tobago.layout.Display display) {
243     getStateHelper().put(PropertyKeys.display, display);
244   }
245 
246   public org.apache.myfaces.tobago.layout.Measure getMinWidth() {
247     Object object = getStateHelper().eval(PropertyKeys.minWidth);
248     if (object != null) {
249        return Measure.valueOf(object);
250     }
251     return null;
252   }
253 
254   public void setMinWidth(org.apache.myfaces.tobago.layout.Measure minWidth) {
255     getStateHelper().put(PropertyKeys.minWidth, minWidth);
256   }
257 
258   public org.apache.myfaces.tobago.layout.Measure getRight() {
259     Object object = getStateHelper().eval(PropertyKeys.right);
260     if (object != null) {
261        return Measure.valueOf(object);
262     }
263     return null;
264   }
265 
266   public void setRight(org.apache.myfaces.tobago.layout.Measure right) {
267     getStateHelper().put(PropertyKeys.right, right);
268   }
269 
270   public org.apache.myfaces.tobago.layout.Measure getMarginLeft() {
271     Object object = getStateHelper().eval(PropertyKeys.marginLeft);
272     if (object != null) {
273        return Measure.valueOf(object);
274     }
275     return null;
276   }
277 
278   public void setMarginLeft(org.apache.myfaces.tobago.layout.Measure marginLeft) {
279     getStateHelper().put(PropertyKeys.marginLeft, marginLeft);
280   }
281 
282   public org.apache.myfaces.tobago.layout.Overflow getOverflowX() {
283     return (org.apache.myfaces.tobago.layout.Overflow) getStateHelper().eval(PropertyKeys.overflowX);
284   }
285 
286   public void setOverflowX(org.apache.myfaces.tobago.layout.Overflow overflowX) {
287     getStateHelper().put(PropertyKeys.overflowX, overflowX);
288   }
289 
290   public org.apache.myfaces.tobago.layout.Overflow getOverflowY() {
291     return (org.apache.myfaces.tobago.layout.Overflow) getStateHelper().eval(PropertyKeys.overflowY);
292   }
293 
294   public void setOverflowY(org.apache.myfaces.tobago.layout.Overflow overflowY) {
295     getStateHelper().put(PropertyKeys.overflowY, overflowY);
296   }
297 
298   public org.apache.myfaces.tobago.layout.Measure getLeft() {
299     Object object = getStateHelper().eval(PropertyKeys.left);
300     if (object != null) {
301        return Measure.valueOf(object);
302     }
303     return null;
304   }
305 
306   public void setLeft(org.apache.myfaces.tobago.layout.Measure left) {
307     getStateHelper().put(PropertyKeys.left, left);
308   }
309 
310   public org.apache.myfaces.tobago.layout.Measure getWidth() {
311     Object object = getStateHelper().eval(PropertyKeys.width);
312     if (object != null) {
313        return Measure.valueOf(object);
314     }
315     return null;
316   }
317 
318   public void setWidth(org.apache.myfaces.tobago.layout.Measure width) {
319     getStateHelper().put(PropertyKeys.width, width);
320   }
321 
322   public org.apache.myfaces.tobago.renderkit.css.CustomClass getCustomClass() {
323     return (org.apache.myfaces.tobago.renderkit.css.CustomClass) getStateHelper().eval(PropertyKeys.customClass);
324   }
325 
326   public void setCustomClass(org.apache.myfaces.tobago.renderkit.css.CustomClass customClass) {
327     getStateHelper().put(PropertyKeys.customClass, customClass);
328   }
329 
330   public org.apache.myfaces.tobago.layout.Measure getMarginBottom() {
331     Object object = getStateHelper().eval(PropertyKeys.marginBottom);
332     if (object != null) {
333        return Measure.valueOf(object);
334     }
335     return null;
336   }
337 
338   public void setMarginBottom(org.apache.myfaces.tobago.layout.Measure marginBottom) {
339     getStateHelper().put(PropertyKeys.marginBottom, marginBottom);
340   }
341 
342   public org.apache.myfaces.tobago.layout.Position getPosition() {
343     return (org.apache.myfaces.tobago.layout.Position) getStateHelper().eval(PropertyKeys.position);
344   }
345 
346   public void setPosition(org.apache.myfaces.tobago.layout.Position position) {
347     getStateHelper().put(PropertyKeys.position, position);
348   }
349 
350   public org.apache.myfaces.tobago.layout.Measure getPaddingLeft() {
351     Object object = getStateHelper().eval(PropertyKeys.paddingLeft);
352     if (object != null) {
353        return Measure.valueOf(object);
354     }
355     return null;
356   }
357 
358   public void setPaddingLeft(org.apache.myfaces.tobago.layout.Measure paddingLeft) {
359     getStateHelper().put(PropertyKeys.paddingLeft, paddingLeft);
360   }
361 
362   public org.apache.myfaces.tobago.layout.Measure getMarginTop() {
363     Object object = getStateHelper().eval(PropertyKeys.marginTop);
364     if (object != null) {
365        return Measure.valueOf(object);
366     }
367     return null;
368   }
369 
370   public void setMarginTop(org.apache.myfaces.tobago.layout.Measure marginTop) {
371     getStateHelper().put(PropertyKeys.marginTop, marginTop);
372   }
373 
374 
375 }