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.context.FacesContext;
23  import org.apache.myfaces.tobago.internal.component.AbstractUIStyle;
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 AbstractUIStyle  {
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      backgroundImage,
60      paddingRight,
61      minHeight,
62      marginRight,
63      file,
64      paddingBottom,
65      top,
66      maxHeight,
67      selector,
68      paddingTop,
69      height,
70      maxWidth,
71      textAlign,
72      bottom,
73      display,
74      minWidth,
75      right,
76      marginLeft,
77      overflowX,
78      overflowY,
79      left,
80      width,
81      customClass,
82      marginBottom,
83      position,
84      paddingLeft,
85      marginTop,
86    }
87  
88    public String getFamily() {
89      return COMPONENT_FAMILY;
90    }
91  
92  
93    /**
94    The background image of the element.
95  
96    */
97    public java.lang.String getBackgroundImage() {
98      return (java.lang.String) getStateHelper().eval(PropertyKeys.backgroundImage);
99    }
100 
101   public void setBackgroundImage(java.lang.String backgroundImage) {
102     getStateHelper().put(PropertyKeys.backgroundImage, backgroundImage);
103   }
104 
105   public org.apache.myfaces.tobago.layout.Measure getPaddingRight() {
106     Object object = getStateHelper().eval(PropertyKeys.paddingRight);
107     if (object != null) {
108        return Measure.valueOf(object);
109     }
110     return null;
111   }
112 
113   public void setPaddingRight(org.apache.myfaces.tobago.layout.Measure paddingRight) {
114     getStateHelper().put(PropertyKeys.paddingRight, paddingRight);
115   }
116 
117   public org.apache.myfaces.tobago.layout.Measure getMinHeight() {
118     Object object = getStateHelper().eval(PropertyKeys.minHeight);
119     if (object != null) {
120        return Measure.valueOf(object);
121     }
122     return null;
123   }
124 
125   public void setMinHeight(org.apache.myfaces.tobago.layout.Measure minHeight) {
126     getStateHelper().put(PropertyKeys.minHeight, minHeight);
127   }
128 
129   public org.apache.myfaces.tobago.layout.Measure getMarginRight() {
130     Object object = getStateHelper().eval(PropertyKeys.marginRight);
131     if (object != null) {
132        return Measure.valueOf(object);
133     }
134     return null;
135   }
136 
137   public void setMarginRight(org.apache.myfaces.tobago.layout.Measure marginRight) {
138     getStateHelper().put(PropertyKeys.marginRight, marginRight);
139   }
140 
141   /**
142   Name of the stylesheet file to add to page. The name must be full qualified, or relative.
143    If using a complete path from root, you'll need to add the contextPath from the web application.
144    This can be done with the EL #{request.contextPath}.
145 
146   */
147   public java.lang.String getFile() {
148     return (java.lang.String) getStateHelper().eval(PropertyKeys.file);
149   }
150 
151   public void setFile(java.lang.String file) {
152     getStateHelper().put(PropertyKeys.file, file);
153   }
154 
155   public org.apache.myfaces.tobago.layout.Measure getPaddingBottom() {
156     Object object = getStateHelper().eval(PropertyKeys.paddingBottom);
157     if (object != null) {
158        return Measure.valueOf(object);
159     }
160     return null;
161   }
162 
163   public void setPaddingBottom(org.apache.myfaces.tobago.layout.Measure paddingBottom) {
164     getStateHelper().put(PropertyKeys.paddingBottom, paddingBottom);
165   }
166 
167   public org.apache.myfaces.tobago.layout.Measure getTop() {
168     Object object = getStateHelper().eval(PropertyKeys.top);
169     if (object != null) {
170        return Measure.valueOf(object);
171     }
172     return null;
173   }
174 
175   public void setTop(org.apache.myfaces.tobago.layout.Measure top) {
176     getStateHelper().put(PropertyKeys.top, top);
177   }
178 
179   public org.apache.myfaces.tobago.layout.Measure getMaxHeight() {
180     Object object = getStateHelper().eval(PropertyKeys.maxHeight);
181     if (object != null) {
182        return Measure.valueOf(object);
183     }
184     return null;
185   }
186 
187   public void setMaxHeight(org.apache.myfaces.tobago.layout.Measure maxHeight) {
188     getStateHelper().put(PropertyKeys.maxHeight, maxHeight);
189   }
190 
191   public java.lang.String getSelector() {
192     return (java.lang.String) getStateHelper().eval(PropertyKeys.selector);
193   }
194 
195   public void setSelector(java.lang.String selector) {
196     getStateHelper().put(PropertyKeys.selector, selector);
197   }
198 
199   public org.apache.myfaces.tobago.layout.Measure getPaddingTop() {
200     Object object = getStateHelper().eval(PropertyKeys.paddingTop);
201     if (object != null) {
202        return Measure.valueOf(object);
203     }
204     return null;
205   }
206 
207   public void setPaddingTop(org.apache.myfaces.tobago.layout.Measure paddingTop) {
208     getStateHelper().put(PropertyKeys.paddingTop, paddingTop);
209   }
210 
211   public org.apache.myfaces.tobago.layout.Measure getHeight() {
212     Object object = getStateHelper().eval(PropertyKeys.height);
213     if (object != null) {
214        return Measure.valueOf(object);
215     }
216     return null;
217   }
218 
219   public void setHeight(org.apache.myfaces.tobago.layout.Measure height) {
220     getStateHelper().put(PropertyKeys.height, height);
221   }
222 
223   public org.apache.myfaces.tobago.layout.Measure getMaxWidth() {
224     Object object = getStateHelper().eval(PropertyKeys.maxWidth);
225     if (object != null) {
226        return Measure.valueOf(object);
227     }
228     return null;
229   }
230 
231   public void setMaxWidth(org.apache.myfaces.tobago.layout.Measure maxWidth) {
232     getStateHelper().put(PropertyKeys.maxWidth, maxWidth);
233   }
234 
235   /**
236   The alignment of the elements inside of the container, possible values are:
237    {
238   <br>Allowed Values: <code>left,right,center,justify</code>
239   */
240   public org.apache.myfaces.tobago.layout.TextAlign getTextAlign() {
241     return (org.apache.myfaces.tobago.layout.TextAlign) getStateHelper().eval(PropertyKeys.textAlign);
242   }
243 
244   public void setTextAlign(org.apache.myfaces.tobago.layout.TextAlign textAlign) {
245     getStateHelper().put(PropertyKeys.textAlign, textAlign);
246   }
247 
248   public org.apache.myfaces.tobago.layout.Measure getBottom() {
249     Object object = getStateHelper().eval(PropertyKeys.bottom);
250     if (object != null) {
251        return Measure.valueOf(object);
252     }
253     return null;
254   }
255 
256   public void setBottom(org.apache.myfaces.tobago.layout.Measure bottom) {
257     getStateHelper().put(PropertyKeys.bottom, bottom);
258   }
259 
260   public org.apache.myfaces.tobago.layout.Display getDisplay() {
261     return (org.apache.myfaces.tobago.layout.Display) getStateHelper().eval(PropertyKeys.display);
262   }
263 
264   public void setDisplay(org.apache.myfaces.tobago.layout.Display display) {
265     getStateHelper().put(PropertyKeys.display, display);
266   }
267 
268   public org.apache.myfaces.tobago.layout.Measure getMinWidth() {
269     Object object = getStateHelper().eval(PropertyKeys.minWidth);
270     if (object != null) {
271        return Measure.valueOf(object);
272     }
273     return null;
274   }
275 
276   public void setMinWidth(org.apache.myfaces.tobago.layout.Measure minWidth) {
277     getStateHelper().put(PropertyKeys.minWidth, minWidth);
278   }
279 
280   public org.apache.myfaces.tobago.layout.Measure getRight() {
281     Object object = getStateHelper().eval(PropertyKeys.right);
282     if (object != null) {
283        return Measure.valueOf(object);
284     }
285     return null;
286   }
287 
288   public void setRight(org.apache.myfaces.tobago.layout.Measure right) {
289     getStateHelper().put(PropertyKeys.right, right);
290   }
291 
292   public org.apache.myfaces.tobago.layout.Measure getMarginLeft() {
293     Object object = getStateHelper().eval(PropertyKeys.marginLeft);
294     if (object != null) {
295        return Measure.valueOf(object);
296     }
297     return null;
298   }
299 
300   public void setMarginLeft(org.apache.myfaces.tobago.layout.Measure marginLeft) {
301     getStateHelper().put(PropertyKeys.marginLeft, marginLeft);
302   }
303 
304   public org.apache.myfaces.tobago.layout.Overflow getOverflowX() {
305     return (org.apache.myfaces.tobago.layout.Overflow) getStateHelper().eval(PropertyKeys.overflowX);
306   }
307 
308   public void setOverflowX(org.apache.myfaces.tobago.layout.Overflow overflowX) {
309     getStateHelper().put(PropertyKeys.overflowX, overflowX);
310   }
311 
312   public org.apache.myfaces.tobago.layout.Overflow getOverflowY() {
313     return (org.apache.myfaces.tobago.layout.Overflow) getStateHelper().eval(PropertyKeys.overflowY);
314   }
315 
316   public void setOverflowY(org.apache.myfaces.tobago.layout.Overflow overflowY) {
317     getStateHelper().put(PropertyKeys.overflowY, overflowY);
318   }
319 
320   public org.apache.myfaces.tobago.layout.Measure getLeft() {
321     Object object = getStateHelper().eval(PropertyKeys.left);
322     if (object != null) {
323        return Measure.valueOf(object);
324     }
325     return null;
326   }
327 
328   public void setLeft(org.apache.myfaces.tobago.layout.Measure left) {
329     getStateHelper().put(PropertyKeys.left, left);
330   }
331 
332   public org.apache.myfaces.tobago.layout.Measure getWidth() {
333     Object object = getStateHelper().eval(PropertyKeys.width);
334     if (object != null) {
335        return Measure.valueOf(object);
336     }
337     return null;
338   }
339 
340   public void setWidth(org.apache.myfaces.tobago.layout.Measure width) {
341     getStateHelper().put(PropertyKeys.width, width);
342   }
343 
344   public org.apache.myfaces.tobago.renderkit.css.CustomClass getCustomClass() {
345     return (org.apache.myfaces.tobago.renderkit.css.CustomClass) getStateHelper().eval(PropertyKeys.customClass);
346   }
347 
348   public void setCustomClass(org.apache.myfaces.tobago.renderkit.css.CustomClass customClass) {
349     getStateHelper().put(PropertyKeys.customClass, customClass);
350   }
351 
352   public org.apache.myfaces.tobago.layout.Measure getMarginBottom() {
353     Object object = getStateHelper().eval(PropertyKeys.marginBottom);
354     if (object != null) {
355        return Measure.valueOf(object);
356     }
357     return null;
358   }
359 
360   public void setMarginBottom(org.apache.myfaces.tobago.layout.Measure marginBottom) {
361     getStateHelper().put(PropertyKeys.marginBottom, marginBottom);
362   }
363 
364   public org.apache.myfaces.tobago.layout.Position getPosition() {
365     return (org.apache.myfaces.tobago.layout.Position) getStateHelper().eval(PropertyKeys.position);
366   }
367 
368   public void setPosition(org.apache.myfaces.tobago.layout.Position position) {
369     getStateHelper().put(PropertyKeys.position, position);
370   }
371 
372   public org.apache.myfaces.tobago.layout.Measure getPaddingLeft() {
373     Object object = getStateHelper().eval(PropertyKeys.paddingLeft);
374     if (object != null) {
375        return Measure.valueOf(object);
376     }
377     return null;
378   }
379 
380   public void setPaddingLeft(org.apache.myfaces.tobago.layout.Measure paddingLeft) {
381     getStateHelper().put(PropertyKeys.paddingLeft, paddingLeft);
382   }
383 
384   public org.apache.myfaces.tobago.layout.Measure getMarginTop() {
385     Object object = getStateHelper().eval(PropertyKeys.marginTop);
386     if (object != null) {
387        return Measure.valueOf(object);
388     }
389     return null;
390   }
391 
392   public void setMarginTop(org.apache.myfaces.tobago.layout.Measure marginTop) {
393     getStateHelper().put(PropertyKeys.marginTop, marginTop);
394   }
395 
396 
397 }