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.AbstractUIColumnSelector;
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   Renders a column with checkboxes to mark selected rows.
41    * UIComponent class, generated from template {@code component2.0.stg} with class
42    * {@link org.apache.myfaces.tobago.internal.taglib.component.ColumnSelectorTagDeclaration}.
43   */
44  public class UIColumnSelector
45      extends AbstractUIColumnSelector  {
46  
47    public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.ColumnSelector";
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      paddingTop,
55      borderTop,
56      overflowX,
57      overflowY,
58      borderBottom,
59      borderRight,
60      borderLeft,
61      paddingBottom,
62      paddingLeft,
63      disabled,
64      paddingRight,
65    }
66  
67    public String getFamily() {
68      return COMPONENT_FAMILY;
69    }
70  
71  
72    /**
73    This attribute is for internal use only.
74  
75    */
76    public org.apache.myfaces.tobago.layout.Measure getPaddingTop() {
77      Object object = getStateHelper().eval(PropertyKeys.paddingTop);
78      if (object != null) {
79         return Measure.valueOf(object);
80      }
81      return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
82    getRenderer(getFacesContext())).getPaddingTop(getFacesContext(), this) : Measure.ZERO;
83    }
84  
85    public void setPaddingTop(org.apache.myfaces.tobago.layout.Measure paddingTop) {
86      getStateHelper().put(PropertyKeys.paddingTop, paddingTop);
87    }
88  
89    /**
90    This attribute is for internal use only.
91  
92    */
93    public org.apache.myfaces.tobago.layout.Measure getBorderTop() {
94      Object object = getStateHelper().eval(PropertyKeys.borderTop);
95      if (object != null) {
96         return Measure.valueOf(object);
97      }
98      return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
99    getRenderer(getFacesContext())).getBorderTop(getFacesContext(), this) : Measure.ZERO;
100   }
101 
102   public void setBorderTop(org.apache.myfaces.tobago.layout.Measure borderTop) {
103     getStateHelper().put(PropertyKeys.borderTop, borderTop);
104   }
105 
106   /**
107   This attribute is for internal use only.
108 
109   */
110   public boolean isOverflowX() {
111     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.overflowX);
112     if (bool != null) {
113       return bool;
114     }
115     return false;
116   }
117 
118   public void setOverflowX(boolean overflowX) {
119     getStateHelper().put(PropertyKeys.overflowX, overflowX);
120   }
121 
122   public org.apache.myfaces.tobago.context.Markup getCurrentMarkup() {
123     if (currentMarkup != null) {
124       return currentMarkup;
125     }
126     return null;
127   }
128 
129   public void setCurrentMarkup(org.apache.myfaces.tobago.context.Markup currentMarkup) {
130     this.currentMarkup = currentMarkup;
131   }
132 
133   /**
134   This attribute is for internal use only.
135 
136   */
137   public boolean isOverflowY() {
138     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.overflowY);
139     if (bool != null) {
140       return bool;
141     }
142     return false;
143   }
144 
145   public void setOverflowY(boolean overflowY) {
146     getStateHelper().put(PropertyKeys.overflowY, overflowY);
147   }
148 
149   /**
150   This attribute is for internal use only.
151 
152   */
153   public org.apache.myfaces.tobago.layout.Measure getBorderBottom() {
154     Object object = getStateHelper().eval(PropertyKeys.borderBottom);
155     if (object != null) {
156        return Measure.valueOf(object);
157     }
158     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
159   getRenderer(getFacesContext())).getBorderBottom(getFacesContext(), this) : Measure.ZERO;
160   }
161 
162   public void setBorderBottom(org.apache.myfaces.tobago.layout.Measure borderBottom) {
163     getStateHelper().put(PropertyKeys.borderBottom, borderBottom);
164   }
165 
166   /**
167   This attribute is for internal use only.
168 
169   */
170   public org.apache.myfaces.tobago.layout.Measure getBorderRight() {
171     Object object = getStateHelper().eval(PropertyKeys.borderRight);
172     if (object != null) {
173        return Measure.valueOf(object);
174     }
175     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
176   getRenderer(getFacesContext())).getBorderRight(getFacesContext(), this) : Measure.ZERO;
177   }
178 
179   public void setBorderRight(org.apache.myfaces.tobago.layout.Measure borderRight) {
180     getStateHelper().put(PropertyKeys.borderRight, borderRight);
181   }
182 
183   /**
184   This attribute is for internal use only.
185 
186   */
187   public org.apache.myfaces.tobago.layout.Measure getBorderLeft() {
188     Object object = getStateHelper().eval(PropertyKeys.borderLeft);
189     if (object != null) {
190        return Measure.valueOf(object);
191     }
192     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
193    getRenderer(getFacesContext())).getBorderLeft(getFacesContext(), this) : Measure.ZERO;
194   }
195 
196   public void setBorderLeft(org.apache.myfaces.tobago.layout.Measure borderLeft) {
197     getStateHelper().put(PropertyKeys.borderLeft, borderLeft);
198   }
199 
200   /**
201   This attribute is for internal use only.
202 
203   */
204   public org.apache.myfaces.tobago.layout.Measure getPaddingBottom() {
205     Object object = getStateHelper().eval(PropertyKeys.paddingBottom);
206     if (object != null) {
207        return Measure.valueOf(object);
208     }
209     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
210   getRenderer(getFacesContext())).getPaddingBottom(getFacesContext(), this) : Measure.ZERO;
211   }
212 
213   public void setPaddingBottom(org.apache.myfaces.tobago.layout.Measure paddingBottom) {
214     getStateHelper().put(PropertyKeys.paddingBottom, paddingBottom);
215   }
216 
217   /**
218   This attribute is for internal use only.
219 
220   */
221   public org.apache.myfaces.tobago.layout.Measure getPaddingLeft() {
222     Object object = getStateHelper().eval(PropertyKeys.paddingLeft);
223     if (object != null) {
224        return Measure.valueOf(object);
225     }
226     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
227   getRenderer(getFacesContext())).getPaddingLeft(getFacesContext(), this) : Measure.ZERO;
228   }
229 
230   public void setPaddingLeft(org.apache.myfaces.tobago.layout.Measure paddingLeft) {
231     getStateHelper().put(PropertyKeys.paddingLeft, paddingLeft);
232   }
233 
234   /**
235   Flag indicating that this element is disabled.
236   <br />Default: <code>false</code>
237   */
238   public boolean isDisabled() {
239     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.disabled);
240     if (bool != null) {
241       return bool;
242     }
243     return false;
244   }
245 
246   public void setDisabled(boolean disabled) {
247     getStateHelper().put(PropertyKeys.disabled, disabled);
248   }
249 
250   /**
251   This attribute is for internal use only.
252 
253   */
254   public org.apache.myfaces.tobago.layout.Measure getPaddingRight() {
255     Object object = getStateHelper().eval(PropertyKeys.paddingRight);
256     if (object != null) {
257        return Measure.valueOf(object);
258     }
259     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
260   getRenderer(getFacesContext())).getPaddingRight(getFacesContext(), this) : Measure.ZERO;
261   }
262 
263   public void setPaddingRight(org.apache.myfaces.tobago.layout.Measure paddingRight) {
264     getStateHelper().put(PropertyKeys.paddingRight, paddingRight);
265   }
266 
267   public Object saveState(FacesContext context) {
268     currentMarkup = null;
269     return super.saveState(context);
270   }
271 
272 
273 }