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.context.Markup;
24  import org.apache.myfaces.tobago.internal.component.AbstractUITreeNode;
25  import org.apache.myfaces.tobago.layout.Measure;
26  import org.apache.myfaces.tobago.internal.util.ArrayUtils;
27  import org.apache.myfaces.tobago.internal.util.StringUtils;
28  import org.apache.myfaces.tobago.internal.util.Deprecation;
29  import org.apache.myfaces.tobago.renderkit.MarginValues;
30  import org.apache.myfaces.tobago.renderkit.SpacingValues;
31  import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer;
32  import javax.el.ELException;
33  import javax.faces.FacesException;
34  import java.util.ArrayList;
35  import java.util.List;
36  import javax.el.MethodExpression;
37  import javax.el.ValueExpression;
38  
39  /** 
40   Creates a tree node. This component represents a single node inside a tree structure.
41    * UIComponent class, generated from template {@code component2.0.stg} with class
42    * {@link org.apache.myfaces.tobago.internal.taglib.component.TreeNodeTagDeclaration}.
43   */
44  public class UITreeNode
45      extends AbstractUITreeNode implements SupportsMarkup {
46  
47    public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.TreeNode";
48  
49    public static final String COMPONENT_FAMILY = "javax.faces.Column";
50  
51    private org.apache.myfaces.tobago.context.Markup currentMarkup;
52  
53    enum PropertyKeys {
54      markup,
55      paddingTop,
56      width,
57      borderBottom,
58      borderLeft,
59      tip,
60      paddingLeft,
61      paddingRight,
62      borderTop,
63      overflowX,
64      overflowY,
65      borderRight,
66      disabled,
67      paddingBottom,
68    }
69  
70    public String getFamily() {
71      return COMPONENT_FAMILY;
72    }
73  
74  
75    public org.apache.myfaces.tobago.context.Markup getMarkup() {
76      Object object = getStateHelper().eval(PropertyKeys.markup);
77      if (object != null) {
78        return Markup.valueOf(object);
79      }
80      return null;
81    }
82  
83    public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) {
84      getStateHelper().put(PropertyKeys.markup, markup);
85    }
86  
87    /**
88    This attribute is for internal use only.
89  
90    */
91    public org.apache.myfaces.tobago.layout.Measure getPaddingTop() {
92      Object object = getStateHelper().eval(PropertyKeys.paddingTop);
93      if (object != null) {
94         return Measure.valueOf(object);
95      }
96      return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
97    getRenderer(getFacesContext())).getPaddingTop(getFacesContext(), this) : Measure.ZERO;
98    }
99  
100   public void setPaddingTop(org.apache.myfaces.tobago.layout.Measure paddingTop) {
101     getStateHelper().put(PropertyKeys.paddingTop, paddingTop);
102   }
103 
104   public org.apache.myfaces.tobago.layout.Measure getWidth() {
105     Object object = getStateHelper().eval(PropertyKeys.width);
106     if (object != null) {
107        return Measure.valueOf(object);
108     }
109     return null;
110   }
111 
112   public void setWidth(org.apache.myfaces.tobago.layout.Measure width) {
113     getStateHelper().put(PropertyKeys.width, width);
114   }
115 
116   /**
117   This attribute is for internal use only.
118 
119   */
120   public org.apache.myfaces.tobago.layout.Measure getBorderBottom() {
121     Object object = getStateHelper().eval(PropertyKeys.borderBottom);
122     if (object != null) {
123        return Measure.valueOf(object);
124     }
125     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
126   getRenderer(getFacesContext())).getBorderBottom(getFacesContext(), this) : Measure.ZERO;
127   }
128 
129   public void setBorderBottom(org.apache.myfaces.tobago.layout.Measure borderBottom) {
130     getStateHelper().put(PropertyKeys.borderBottom, borderBottom);
131   }
132 
133   /**
134   This attribute is for internal use only.
135 
136   */
137   public org.apache.myfaces.tobago.layout.Measure getBorderLeft() {
138     Object object = getStateHelper().eval(PropertyKeys.borderLeft);
139     if (object != null) {
140        return Measure.valueOf(object);
141     }
142     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
143    getRenderer(getFacesContext())).getBorderLeft(getFacesContext(), this) : Measure.ZERO;
144   }
145 
146   public void setBorderLeft(org.apache.myfaces.tobago.layout.Measure borderLeft) {
147     getStateHelper().put(PropertyKeys.borderLeft, borderLeft);
148   }
149 
150   /**
151   Text value to display as tooltip.
152 
153   */
154   public java.lang.String getTip() {
155     return (java.lang.String) getStateHelper().eval(PropertyKeys.tip);
156   }
157 
158   public void setTip(java.lang.String tip) {
159     getStateHelper().put(PropertyKeys.tip, tip);
160   }
161 
162   /**
163   This attribute is for internal use only.
164 
165   */
166   public org.apache.myfaces.tobago.layout.Measure getPaddingLeft() {
167     Object object = getStateHelper().eval(PropertyKeys.paddingLeft);
168     if (object != null) {
169        return Measure.valueOf(object);
170     }
171     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
172   getRenderer(getFacesContext())).getPaddingLeft(getFacesContext(), this) : Measure.ZERO;
173   }
174 
175   public void setPaddingLeft(org.apache.myfaces.tobago.layout.Measure paddingLeft) {
176     getStateHelper().put(PropertyKeys.paddingLeft, paddingLeft);
177   }
178 
179   /**
180   This attribute is for internal use only.
181 
182   */
183   public org.apache.myfaces.tobago.layout.Measure getPaddingRight() {
184     Object object = getStateHelper().eval(PropertyKeys.paddingRight);
185     if (object != null) {
186        return Measure.valueOf(object);
187     }
188     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
189   getRenderer(getFacesContext())).getPaddingRight(getFacesContext(), this) : Measure.ZERO;
190   }
191 
192   public void setPaddingRight(org.apache.myfaces.tobago.layout.Measure paddingRight) {
193     getStateHelper().put(PropertyKeys.paddingRight, paddingRight);
194   }
195 
196   /**
197   This attribute is for internal use only.
198 
199   */
200   public org.apache.myfaces.tobago.layout.Measure getBorderTop() {
201     Object object = getStateHelper().eval(PropertyKeys.borderTop);
202     if (object != null) {
203        return Measure.valueOf(object);
204     }
205     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
206   getRenderer(getFacesContext())).getBorderTop(getFacesContext(), this) : Measure.ZERO;
207   }
208 
209   public void setBorderTop(org.apache.myfaces.tobago.layout.Measure borderTop) {
210     getStateHelper().put(PropertyKeys.borderTop, borderTop);
211   }
212 
213   /**
214   This attribute is for internal use only.
215 
216   */
217   public boolean isOverflowX() {
218     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.overflowX);
219     if (bool != null) {
220       return bool;
221     }
222     return false;
223   }
224 
225   public void setOverflowX(boolean overflowX) {
226     getStateHelper().put(PropertyKeys.overflowX, overflowX);
227   }
228 
229   public org.apache.myfaces.tobago.context.Markup getCurrentMarkup() {
230     if (currentMarkup != null) {
231       return currentMarkup;
232     }
233     return null;
234   }
235 
236   public void setCurrentMarkup(org.apache.myfaces.tobago.context.Markup currentMarkup) {
237     this.currentMarkup = currentMarkup;
238   }
239 
240   /**
241   This attribute is for internal use only.
242 
243   */
244   public boolean isOverflowY() {
245     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.overflowY);
246     if (bool != null) {
247       return bool;
248     }
249     return false;
250   }
251 
252   public void setOverflowY(boolean overflowY) {
253     getStateHelper().put(PropertyKeys.overflowY, overflowY);
254   }
255 
256   /**
257   This attribute is for internal use only.
258 
259   */
260   public org.apache.myfaces.tobago.layout.Measure getBorderRight() {
261     Object object = getStateHelper().eval(PropertyKeys.borderRight);
262     if (object != null) {
263        return Measure.valueOf(object);
264     }
265     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
266   getRenderer(getFacesContext())).getBorderRight(getFacesContext(), this) : Measure.ZERO;
267   }
268 
269   public void setBorderRight(org.apache.myfaces.tobago.layout.Measure borderRight) {
270     getStateHelper().put(PropertyKeys.borderRight, borderRight);
271   }
272 
273   /**
274   Flag indicating that this element is disabled.
275   <br />Default: <code>false</code>
276   */
277   public boolean isDisabled() {
278     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.disabled);
279     if (bool != null) {
280       return bool;
281     }
282     return false;
283   }
284 
285   public void setDisabled(boolean disabled) {
286     getStateHelper().put(PropertyKeys.disabled, disabled);
287   }
288 
289   /**
290   This attribute is for internal use only.
291 
292   */
293   public org.apache.myfaces.tobago.layout.Measure getPaddingBottom() {
294     Object object = getStateHelper().eval(PropertyKeys.paddingBottom);
295     if (object != null) {
296        return Measure.valueOf(object);
297     }
298     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
299   getRenderer(getFacesContext())).getPaddingBottom(getFacesContext(), this) : Measure.ZERO;
300   }
301 
302   public void setPaddingBottom(org.apache.myfaces.tobago.layout.Measure paddingBottom) {
303     getStateHelper().put(PropertyKeys.paddingBottom, paddingBottom);
304   }
305 
306   public Object saveState(FacesContext context) {
307     currentMarkup = null;
308     return super.saveState(context);
309   }
310 
311 
312 }