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.ArrayList;
36  import java.util.List;
37  import javax.el.MethodExpression;
38  import javax.el.ValueExpression;
39  
40  /** 
41   <p>
42    Add a style tag with the given file name.
43    </p>
44    <p>
45    Remark: Inline styles are deprecated because of CSP.
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.
129 
130   */
131   public java.lang.String getFile() {
132     return (java.lang.String) getStateHelper().eval(PropertyKeys.file);
133   }
134 
135   public void setFile(java.lang.String file) {
136     getStateHelper().put(PropertyKeys.file, file);
137   }
138 
139   public org.apache.myfaces.tobago.layout.Measure getPaddingBottom() {
140     Object object = getStateHelper().eval(PropertyKeys.paddingBottom);
141     if (object != null) {
142        return Measure.valueOf(object);
143     }
144     return null;
145   }
146 
147   public void setPaddingBottom(org.apache.myfaces.tobago.layout.Measure paddingBottom) {
148     getStateHelper().put(PropertyKeys.paddingBottom, paddingBottom);
149   }
150 
151   public org.apache.myfaces.tobago.layout.Measure getTop() {
152     Object object = getStateHelper().eval(PropertyKeys.top);
153     if (object != null) {
154        return Measure.valueOf(object);
155     }
156     return null;
157   }
158 
159   public void setTop(org.apache.myfaces.tobago.layout.Measure top) {
160     getStateHelper().put(PropertyKeys.top, top);
161   }
162 
163   public org.apache.myfaces.tobago.layout.Measure getMaxHeight() {
164     Object object = getStateHelper().eval(PropertyKeys.maxHeight);
165     if (object != null) {
166        return Measure.valueOf(object);
167     }
168     return null;
169   }
170 
171   public void setMaxHeight(org.apache.myfaces.tobago.layout.Measure maxHeight) {
172     getStateHelper().put(PropertyKeys.maxHeight, maxHeight);
173   }
174 
175   public org.apache.myfaces.tobago.layout.Measure getPaddingTop() {
176     Object object = getStateHelper().eval(PropertyKeys.paddingTop);
177     if (object != null) {
178        return Measure.valueOf(object);
179     }
180     return null;
181   }
182 
183   public void setPaddingTop(org.apache.myfaces.tobago.layout.Measure paddingTop) {
184     getStateHelper().put(PropertyKeys.paddingTop, paddingTop);
185   }
186 
187   public org.apache.myfaces.tobago.layout.Measure getHeight() {
188     Object object = getStateHelper().eval(PropertyKeys.height);
189     if (object != null) {
190        return Measure.valueOf(object);
191     }
192     return null;
193   }
194 
195   public void setHeight(org.apache.myfaces.tobago.layout.Measure height) {
196     getStateHelper().put(PropertyKeys.height, height);
197   }
198 
199   public org.apache.myfaces.tobago.layout.Measure getMaxWidth() {
200     Object object = getStateHelper().eval(PropertyKeys.maxWidth);
201     if (object != null) {
202        return Measure.valueOf(object);
203     }
204     return null;
205   }
206 
207   public void setMaxWidth(org.apache.myfaces.tobago.layout.Measure maxWidth) {
208     getStateHelper().put(PropertyKeys.maxWidth, maxWidth);
209   }
210 
211   /**
212   The alignment of the elements inside of the container, possible values are:
213    {
214   <br>Allowed Values: <code>left,right,center,justify</code>
215   */
216   public org.apache.myfaces.tobago.layout.TextAlign getTextAlign() {
217     return (org.apache.myfaces.tobago.layout.TextAlign) getStateHelper().eval(PropertyKeys.textAlign);
218   }
219 
220   public void setTextAlign(org.apache.myfaces.tobago.layout.TextAlign textAlign) {
221     getStateHelper().put(PropertyKeys.textAlign, textAlign);
222   }
223 
224   public org.apache.myfaces.tobago.layout.Measure getBottom() {
225     Object object = getStateHelper().eval(PropertyKeys.bottom);
226     if (object != null) {
227        return Measure.valueOf(object);
228     }
229     return null;
230   }
231 
232   public void setBottom(org.apache.myfaces.tobago.layout.Measure bottom) {
233     getStateHelper().put(PropertyKeys.bottom, bottom);
234   }
235 
236   public org.apache.myfaces.tobago.layout.Display getDisplay() {
237     return (org.apache.myfaces.tobago.layout.Display) getStateHelper().eval(PropertyKeys.display);
238   }
239 
240   public void setDisplay(org.apache.myfaces.tobago.layout.Display display) {
241     getStateHelper().put(PropertyKeys.display, display);
242   }
243 
244   public org.apache.myfaces.tobago.layout.Measure getMinWidth() {
245     Object object = getStateHelper().eval(PropertyKeys.minWidth);
246     if (object != null) {
247        return Measure.valueOf(object);
248     }
249     return null;
250   }
251 
252   public void setMinWidth(org.apache.myfaces.tobago.layout.Measure minWidth) {
253     getStateHelper().put(PropertyKeys.minWidth, minWidth);
254   }
255 
256   public org.apache.myfaces.tobago.layout.Measure getRight() {
257     Object object = getStateHelper().eval(PropertyKeys.right);
258     if (object != null) {
259        return Measure.valueOf(object);
260     }
261     return null;
262   }
263 
264   public void setRight(org.apache.myfaces.tobago.layout.Measure right) {
265     getStateHelper().put(PropertyKeys.right, right);
266   }
267 
268   public org.apache.myfaces.tobago.layout.Measure getMarginLeft() {
269     Object object = getStateHelper().eval(PropertyKeys.marginLeft);
270     if (object != null) {
271        return Measure.valueOf(object);
272     }
273     return null;
274   }
275 
276   public void setMarginLeft(org.apache.myfaces.tobago.layout.Measure marginLeft) {
277     getStateHelper().put(PropertyKeys.marginLeft, marginLeft);
278   }
279 
280   public org.apache.myfaces.tobago.layout.Overflow getOverflowX() {
281     return (org.apache.myfaces.tobago.layout.Overflow) getStateHelper().eval(PropertyKeys.overflowX);
282   }
283 
284   public void setOverflowX(org.apache.myfaces.tobago.layout.Overflow overflowX) {
285     getStateHelper().put(PropertyKeys.overflowX, overflowX);
286   }
287 
288   public org.apache.myfaces.tobago.layout.Overflow getOverflowY() {
289     return (org.apache.myfaces.tobago.layout.Overflow) getStateHelper().eval(PropertyKeys.overflowY);
290   }
291 
292   public void setOverflowY(org.apache.myfaces.tobago.layout.Overflow overflowY) {
293     getStateHelper().put(PropertyKeys.overflowY, overflowY);
294   }
295 
296   public org.apache.myfaces.tobago.layout.Measure getLeft() {
297     Object object = getStateHelper().eval(PropertyKeys.left);
298     if (object != null) {
299        return Measure.valueOf(object);
300     }
301     return null;
302   }
303 
304   public void setLeft(org.apache.myfaces.tobago.layout.Measure left) {
305     getStateHelper().put(PropertyKeys.left, left);
306   }
307 
308   public org.apache.myfaces.tobago.layout.Measure getWidth() {
309     Object object = getStateHelper().eval(PropertyKeys.width);
310     if (object != null) {
311        return Measure.valueOf(object);
312     }
313     return null;
314   }
315 
316   public void setWidth(org.apache.myfaces.tobago.layout.Measure width) {
317     getStateHelper().put(PropertyKeys.width, width);
318   }
319 
320   public org.apache.myfaces.tobago.renderkit.css.CustomClass getCustomClass() {
321     return (org.apache.myfaces.tobago.renderkit.css.CustomClass) getStateHelper().eval(PropertyKeys.customClass);
322   }
323 
324   public void setCustomClass(org.apache.myfaces.tobago.renderkit.css.CustomClass customClass) {
325     getStateHelper().put(PropertyKeys.customClass, customClass);
326   }
327 
328   public org.apache.myfaces.tobago.layout.Measure getMarginBottom() {
329     Object object = getStateHelper().eval(PropertyKeys.marginBottom);
330     if (object != null) {
331        return Measure.valueOf(object);
332     }
333     return null;
334   }
335 
336   public void setMarginBottom(org.apache.myfaces.tobago.layout.Measure marginBottom) {
337     getStateHelper().put(PropertyKeys.marginBottom, marginBottom);
338   }
339 
340   public org.apache.myfaces.tobago.layout.Position getPosition() {
341     return (org.apache.myfaces.tobago.layout.Position) getStateHelper().eval(PropertyKeys.position);
342   }
343 
344   public void setPosition(org.apache.myfaces.tobago.layout.Position position) {
345     getStateHelper().put(PropertyKeys.position, position);
346   }
347 
348   public org.apache.myfaces.tobago.layout.Measure getPaddingLeft() {
349     Object object = getStateHelper().eval(PropertyKeys.paddingLeft);
350     if (object != null) {
351        return Measure.valueOf(object);
352     }
353     return null;
354   }
355 
356   public void setPaddingLeft(org.apache.myfaces.tobago.layout.Measure paddingLeft) {
357     getStateHelper().put(PropertyKeys.paddingLeft, paddingLeft);
358   }
359 
360   public org.apache.myfaces.tobago.layout.Measure getMarginTop() {
361     Object object = getStateHelper().eval(PropertyKeys.marginTop);
362     if (object != null) {
363        return Measure.valueOf(object);
364     }
365     return null;
366   }
367 
368   public void setMarginTop(org.apache.myfaces.tobago.layout.Measure marginTop) {
369     getStateHelper().put(PropertyKeys.marginTop, marginTop);
370   }
371 
372 
373 }