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.el.MethodExpression;
23  import javax.faces.context.FacesContext;
24  import org.apache.myfaces.tobago.context.Markup;
25  import org.apache.myfaces.tobago.event.SortActionSource2;
26  import org.apache.myfaces.tobago.internal.component.AbstractUISheet;
27  import org.apache.myfaces.tobago.layout.Display;
28  import org.apache.myfaces.tobago.layout.Measure;
29  import org.apache.myfaces.tobago.internal.util.ArrayUtils;
30  import org.apache.myfaces.tobago.internal.util.StringUtils;
31  import org.apache.myfaces.tobago.internal.util.Deprecation;
32  import org.apache.myfaces.tobago.renderkit.MarginValues;
33  import org.apache.myfaces.tobago.renderkit.SpacingValues;
34  import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer;
35  import javax.el.ELException;
36  import javax.faces.FacesException;
37  import java.util.ArrayList;
38  import java.util.List;
39  import javax.el.MethodExpression;
40  import javax.el.ValueExpression;
41  
42  /** 
43   Render a sheet element.
44    * UIComponent class, generated from template {@code component2.0.stg} with class
45    * {@link org.apache.myfaces.tobago.internal.taglib.component.SheetTagDeclaration}.
46   */
47  public class UISheet
48      extends AbstractUISheet implements SortActionSource2, SupportsMarkup {
49  
50    public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Sheet";
51  
52    public static final String COMPONENT_FAMILY = "javax.faces.Data";
53  
54    private org.apache.myfaces.tobago.context.Markup currentMarkup;
55  
56    enum PropertyKeys {
57      markup,
58      marginLeft,
59      columns,
60      borderLeft,
61      height,
62      minimumWidth,
63      showDirectLinks,
64      showPageRange,
65      overflowX,
66      overflowY,
67      forceVerticalScrollbar,
68      stateChangeListener,
69      borderRight,
70      maximumHeight,
71      currentWidth,
72      paddingTop,
73      marginTop,
74      width,
75      currentHeight,
76      display,
77      borderBottom,
78      showRootJunction,
79      paddingLeft,
80      preferredWidth,
81      borderTop,
82      verticalIndex,
83      showPagingAlways,
84      renderedPartially,
85      minimumHeight,
86      showRoot,
87      rowSpan,
88      left,
89      columnSpan,
90      paddingBottom,
91      top,
92      showRowRange,
93      marginRight,
94      preferredHeight,
95      maximumWidth,
96      paddingRight,
97      marginBottom,
98      selectable,
99      showHeader,
100     directLinkCount,
101     sortActionListener,
102     horizontalIndex,
103   }
104 
105   public String getFamily() {
106     return COMPONENT_FAMILY;
107   }
108 
109 
110   public org.apache.myfaces.tobago.context.Markup getMarkup() {
111     Object object = getStateHelper().eval(PropertyKeys.markup);
112     if (object != null) {
113       return Markup.valueOf(object);
114     }
115     return null;
116   }
117 
118   public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) {
119     getStateHelper().put(PropertyKeys.markup, markup);
120   }
121 
122   public org.apache.myfaces.tobago.layout.Measure getMarginLeft() {
123     Object object = getStateHelper().eval(PropertyKeys.marginLeft);
124     if (object != null) {
125        return Measure.valueOf(object);
126     }
127     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginLeft(getFacesContext(), this) : Measure.ZERO;
128   }
129 
130   public void setMarginLeft(org.apache.myfaces.tobago.layout.Measure marginLeft) {
131     getStateHelper().put(PropertyKeys.marginLeft, marginLeft);
132   }
133 
134   /**
135   LayoutConstraints for column layout.
136    Semicolon separated list of layout tokens ('<x>*', '<x>px' or '<x>%').
137 
138   */
139   public java.lang.String getColumns() {
140     return (java.lang.String) getStateHelper().eval(PropertyKeys.columns);
141   }
142 
143   public void setColumns(java.lang.String columns) {
144     getStateHelper().put(PropertyKeys.columns, columns);
145   }
146 
147   /**
148   This attribute is for internal use only.
149 
150   */
151   public org.apache.myfaces.tobago.layout.Measure getBorderLeft() {
152     Object object = getStateHelper().eval(PropertyKeys.borderLeft);
153     if (object != null) {
154        return Measure.valueOf(object);
155     }
156     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
157    getRenderer(getFacesContext())).getBorderLeft(getFacesContext(), this) : Measure.ZERO;
158   }
159 
160   public void setBorderLeft(org.apache.myfaces.tobago.layout.Measure borderLeft) {
161     getStateHelper().put(PropertyKeys.borderLeft, borderLeft);
162   }
163 
164   /**
165   This value will usually be set by the layout manager.
166 
167   */
168   public org.apache.myfaces.tobago.layout.Measure getHeight() {
169     Object object = getStateHelper().eval(PropertyKeys.height);
170     if (object != null) {
171        return Measure.valueOf(object);
172     }
173     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getHeight(getFacesContext(), this) : Measure.ZERO;
174   }
175 
176   public void setHeight(org.apache.myfaces.tobago.layout.Measure height) {
177     getStateHelper().put(PropertyKeys.height, height);
178   }
179 
180   public org.apache.myfaces.tobago.layout.Measure getMinimumWidth() {
181     Object object = getStateHelper().eval(PropertyKeys.minimumWidth);
182     if (object != null) {
183        return Measure.valueOf(object);
184     }
185     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this) : Measure.ZERO;
186   }
187 
188   public void setMinimumWidth(org.apache.myfaces.tobago.layout.Measure minimumWidth) {
189     getStateHelper().put(PropertyKeys.minimumWidth, minimumWidth);
190   }
191 
192   /**
193   Flag indicating whether or not a range of direct paging links should be
194    rendered in the sheet's footer.
195   <br />Default: <code>center</code><br />Allowed Values: <code>left,center,right,none</code>
196   */
197   public java.lang.String getShowDirectLinks() {
198     java.lang.String showDirectLinks = (java.lang.String) getStateHelper().eval(PropertyKeys.showDirectLinks);
199     if (showDirectLinks != null) {
200       return showDirectLinks;
201     }
202     return "center";
203   }
204 
205   public void setShowDirectLinks(java.lang.String showDirectLinks) {
206     getStateHelper().put(PropertyKeys.showDirectLinks, showDirectLinks);
207   }
208 
209   /**
210   Flag indicating whether and where the range pages should
211    rendered in the sheet's footer. Rendering this range also offers the
212    capability to enter the index displayed page directly.
213   <br />Default: <code>right</code><br />Allowed Values: <code>left,center,right,none</code>
214   */
215   public java.lang.String getShowPageRange() {
216     java.lang.String showPageRange = (java.lang.String) getStateHelper().eval(PropertyKeys.showPageRange);
217     if (showPageRange != null) {
218       return showPageRange;
219     }
220     return "right";
221   }
222 
223   public void setShowPageRange(java.lang.String showPageRange) {
224     getStateHelper().put(PropertyKeys.showPageRange, showPageRange);
225   }
226 
227   /**
228   This attribute is for internal use only.
229 
230   */
231   public boolean isOverflowX() {
232     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.overflowX);
233     if (bool != null) {
234       return bool;
235     }
236     return false;
237   }
238 
239   public void setOverflowX(boolean overflowX) {
240     getStateHelper().put(PropertyKeys.overflowX, overflowX);
241   }
242 
243   /**
244   This attribute is for internal use only.
245 
246   */
247   public boolean isOverflowY() {
248     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.overflowY);
249     if (bool != null) {
250       return bool;
251     }
252     return false;
253   }
254 
255   public void setOverflowY(boolean overflowY) {
256     getStateHelper().put(PropertyKeys.overflowY, overflowY);
257   }
258 
259   /**
260   Flag indicating whether or not this sheet should reserve space for
261    vertical toolbar when calculating column width's.<br />
262    Possible values are: <pre>
263         'auto'  : sheet try to estimate the need of scrollbar.
264         'true'  : space for scrollbar is reserved.
265         'false' : no space is reserved.
266         </pre>
267   <br />Default: <code>auto</code><br />Allowed Values: <code>auto,true,false</code>
268   */
269   public java.lang.String getForceVerticalScrollbar() {
270     java.lang.String forceVerticalScrollbar = (java.lang.String) getStateHelper().eval(PropertyKeys.forceVerticalScrollbar);
271     if (forceVerticalScrollbar != null) {
272       return forceVerticalScrollbar;
273     }
274     return "auto";
275   }
276 
277   public void setForceVerticalScrollbar(java.lang.String forceVerticalScrollbar) {
278     getStateHelper().put(PropertyKeys.forceVerticalScrollbar, forceVerticalScrollbar);
279   }
280 
281   /**
282    * @deprecated since 2.0.0
283    */
284   @Deprecated
285   public javax.faces.el.MethodBinding getStateChangeListener() {
286     javax.el.MethodExpression expression = getStateChangeListenerExpression();
287     if (expression instanceof MethodBindingToMethodExpression) {
288       return ((MethodBindingToMethodExpression)expression).getMethodBinding();
289     }
290     if (expression != null) {
291        return new MethodExpressionToMethodBinding(expression);
292     }
293     return null;
294   }
295 
296   /**
297    * @deprecated since 2.0.0
298    */
299   @Deprecated
300   public void setStateChangeListener(javax.faces.el.MethodBinding stateChangeListener) {
301     if (stateChangeListener != null) {
302       setStateChangeListenerExpression(new MethodBindingToMethodExpression(stateChangeListener));
303     } else {
304       setStateChangeListenerExpression(null);
305     }
306   }
307 
308   public javax.el.MethodExpression getStateChangeListenerExpression() {
309     return (javax.el.MethodExpression) getStateHelper().eval(PropertyKeys.stateChangeListener);
310   }
311 
312   public void setStateChangeListenerExpression(javax.el.MethodExpression stateChangeListener) {
313     getStateHelper().put(PropertyKeys.stateChangeListener, stateChangeListener);
314   }
315 
316 
317   /**
318   This attribute is for internal use only.
319 
320   */
321   public org.apache.myfaces.tobago.layout.Measure getBorderRight() {
322     Object object = getStateHelper().eval(PropertyKeys.borderRight);
323     if (object != null) {
324        return Measure.valueOf(object);
325     }
326     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
327   getRenderer(getFacesContext())).getBorderRight(getFacesContext(), this) : Measure.ZERO;
328   }
329 
330   public void setBorderRight(org.apache.myfaces.tobago.layout.Measure borderRight) {
331     getStateHelper().put(PropertyKeys.borderRight, borderRight);
332   }
333 
334   public org.apache.myfaces.tobago.layout.Measure getMaximumHeight() {
335     Object object = getStateHelper().eval(PropertyKeys.maximumHeight);
336     if (object != null) {
337        return Measure.valueOf(object);
338     }
339     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this) : Measure.ZERO;
340   }
341 
342   public void setMaximumHeight(org.apache.myfaces.tobago.layout.Measure maximumHeight) {
343     getStateHelper().put(PropertyKeys.maximumHeight, maximumHeight);
344   }
345 
346   /**
347   This value will usually be set by the layout manager. It holds the current width computed by the layout manager.
348 
349   */
350   public org.apache.myfaces.tobago.layout.Measure getCurrentWidth() {
351     Object object = getStateHelper().eval(PropertyKeys.currentWidth);
352     if (object != null) {
353        return Measure.valueOf(object);
354     }
355     return getWidth();
356   }
357 
358   public void setCurrentWidth(org.apache.myfaces.tobago.layout.Measure currentWidth) {
359     getStateHelper().put(PropertyKeys.currentWidth, currentWidth);
360   }
361 
362   /**
363   This attribute is for internal use only.
364 
365   */
366   public org.apache.myfaces.tobago.layout.Measure getPaddingTop() {
367     Object object = getStateHelper().eval(PropertyKeys.paddingTop);
368     if (object != null) {
369        return Measure.valueOf(object);
370     }
371     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
372   getRenderer(getFacesContext())).getPaddingTop(getFacesContext(), this) : Measure.ZERO;
373   }
374 
375   public void setPaddingTop(org.apache.myfaces.tobago.layout.Measure paddingTop) {
376     getStateHelper().put(PropertyKeys.paddingTop, paddingTop);
377   }
378 
379   public org.apache.myfaces.tobago.layout.Measure getMarginTop() {
380     Object object = getStateHelper().eval(PropertyKeys.marginTop);
381     if (object != null) {
382        return Measure.valueOf(object);
383     }
384     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginTop(getFacesContext(), this) : Measure.ZERO;
385   }
386 
387   public void setMarginTop(org.apache.myfaces.tobago.layout.Measure marginTop) {
388     getStateHelper().put(PropertyKeys.marginTop, marginTop);
389   }
390 
391   /**
392   This value will usually be set by the layout manager.
393 
394   */
395   public org.apache.myfaces.tobago.layout.Measure getWidth() {
396     Object object = getStateHelper().eval(PropertyKeys.width);
397     if (object != null) {
398        return Measure.valueOf(object);
399     }
400     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getWidth(getFacesContext(), this) : Measure.ZERO;
401   }
402 
403   public void setWidth(org.apache.myfaces.tobago.layout.Measure width) {
404     getStateHelper().put(PropertyKeys.width, width);
405   }
406 
407   /**
408   This value will usually be set by the layout manager. It holds the current height computed by the layout manager.
409 
410   */
411   public org.apache.myfaces.tobago.layout.Measure getCurrentHeight() {
412     Object object = getStateHelper().eval(PropertyKeys.currentHeight);
413     if (object != null) {
414        return Measure.valueOf(object);
415     }
416     return getHeight();
417   }
418 
419   public void setCurrentHeight(org.apache.myfaces.tobago.layout.Measure currentHeight) {
420     getStateHelper().put(PropertyKeys.currentHeight, currentHeight);
421   }
422 
423   /**
424   This attribute is for internal use only.
425 
426   */
427   public org.apache.myfaces.tobago.layout.Display getDisplay() {
428     return (org.apache.myfaces.tobago.layout.Display) getStateHelper().eval(PropertyKeys.display);
429   }
430 
431   public void setDisplay(org.apache.myfaces.tobago.layout.Display display) {
432     getStateHelper().put(PropertyKeys.display, display);
433   }
434 
435   /**
436   This attribute is for internal use only.
437 
438   */
439   public org.apache.myfaces.tobago.layout.Measure getBorderBottom() {
440     Object object = getStateHelper().eval(PropertyKeys.borderBottom);
441     if (object != null) {
442        return Measure.valueOf(object);
443     }
444     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
445   getRenderer(getFacesContext())).getBorderBottom(getFacesContext(), this) : Measure.ZERO;
446   }
447 
448   public void setBorderBottom(org.apache.myfaces.tobago.layout.Measure borderBottom) {
449     getStateHelper().put(PropertyKeys.borderBottom, borderBottom);
450   }
451 
452   /**
453   Only applicable in the case that the data model is a tree.
454    This flag indicates that the root node should be displayed with an open-close-switch.
455   <br />Default: <code>false</code>
456   */
457   public boolean isShowRootJunction() {
458     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.showRootJunction);
459     if (bool != null) {
460       return bool;
461     }
462     return false;
463   }
464 
465   public void setShowRootJunction(boolean showRootJunction) {
466     getStateHelper().put(PropertyKeys.showRootJunction, showRootJunction);
467   }
468 
469   /**
470   This attribute is for internal use only.
471 
472   */
473   public org.apache.myfaces.tobago.layout.Measure getPaddingLeft() {
474     Object object = getStateHelper().eval(PropertyKeys.paddingLeft);
475     if (object != null) {
476        return Measure.valueOf(object);
477     }
478     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
479   getRenderer(getFacesContext())).getPaddingLeft(getFacesContext(), this) : Measure.ZERO;
480   }
481 
482   public void setPaddingLeft(org.apache.myfaces.tobago.layout.Measure paddingLeft) {
483     getStateHelper().put(PropertyKeys.paddingLeft, paddingLeft);
484   }
485 
486   public org.apache.myfaces.tobago.layout.Measure getPreferredWidth() {
487     Object object = getStateHelper().eval(PropertyKeys.preferredWidth);
488     if (object != null) {
489        return Measure.valueOf(object);
490     }
491     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this) : Measure.ZERO;
492   }
493 
494   public void setPreferredWidth(org.apache.myfaces.tobago.layout.Measure preferredWidth) {
495     getStateHelper().put(PropertyKeys.preferredWidth, preferredWidth);
496   }
497 
498   /**
499   This attribute is for internal use only.
500 
501   */
502   public org.apache.myfaces.tobago.layout.Measure getBorderTop() {
503     Object object = getStateHelper().eval(PropertyKeys.borderTop);
504     if (object != null) {
505        return Measure.valueOf(object);
506     }
507     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
508   getRenderer(getFacesContext())).getBorderTop(getFacesContext(), this) : Measure.ZERO;
509   }
510 
511   public void setBorderTop(org.apache.myfaces.tobago.layout.Measure borderTop) {
512     getStateHelper().put(PropertyKeys.borderTop, borderTop);
513   }
514 
515   /**
516   This attribute is for internal use only.
517 
518   */
519   public java.lang.Integer getVerticalIndex() {
520     Number value  = (Number) getStateHelper().eval(PropertyKeys.verticalIndex);
521     if (value != null) {
522       return value.intValue();
523     }
524     return null;
525   }
526 
527   public void setVerticalIndex(java.lang.Integer verticalIndex) {
528     getStateHelper().put(PropertyKeys.verticalIndex, verticalIndex);
529   }
530 
531   /**
532   Flag indicating whether or not the paging panel should be display, if it is not needed for paging.<br />
533    <ul>
534    <li>showPagingAlways="false" which is the default means, that the paging footer should be displayed,
535    only when it is needed.</li>
536    <ul>
537    <li>When the rows="0" paging is not needed, so the footer will not be rendered,</li>
538    <li>when rows="N", N &gt; 0 and the size of the data value is &lt;= N paging is not needed
539    and the footer will not be rendered,</li>
540    <li>in any other case the paging footer will be displayed.</li>
541    </ul>
542    <li>showPagingAlways="true" means, that the paging footer should be displayed in any case.</li>
543    </ul>
544   <br />Default: <code>false</code>
545   */
546   public boolean isShowPagingAlways() {
547     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.showPagingAlways);
548     if (bool != null) {
549       return bool;
550     }
551     return false;
552   }
553 
554   public void setShowPagingAlways(boolean showPagingAlways) {
555     getStateHelper().put(PropertyKeys.showPagingAlways, showPagingAlways);
556   }
557 
558   public org.apache.myfaces.tobago.context.Markup getCurrentMarkup() {
559     if (currentMarkup != null) {
560       return currentMarkup;
561     }
562     return null;
563   }
564 
565   public void setCurrentMarkup(org.apache.myfaces.tobago.context.Markup currentMarkup) {
566     this.currentMarkup = currentMarkup;
567   }
568 
569   /**
570   Indicate the partially rendered Components in a case of a submit.
571 
572   */
573   public String[] getRenderedPartially() {
574     Object strArray = getStateHelper().eval(PropertyKeys.renderedPartially);
575     if (strArray != null) {
576       if (strArray instanceof String[]) {
577         return (String[]) strArray;
578       } else if (strArray instanceof String) {
579         String[] strings = StringUtils.split((String) strArray, ", ");
580         List<String> result = new ArrayList<String>(strings.length);
581         for (String string : strings) {
582           if (string.trim().length() != 0) {
583             result.add(string.trim());
584           }
585         }
586         return result.toArray(new String[result.size()]);
587       } else if (strArray == null) {
588         return org.apache.myfaces.tobago.internal.util.ArrayUtils.EMPTY_STRING_ARRAY;
589       } else {
590         return new String[]{strArray.toString()};
591       }
592     }
593     return org.apache.myfaces.tobago.internal.util.ArrayUtils.EMPTY_STRING_ARRAY;
594   }
595 
596   public void setRenderedPartially(String[] renderedPartially) {
597     getStateHelper().put(PropertyKeys.renderedPartially, renderedPartially);
598   }
599 
600   public org.apache.myfaces.tobago.layout.Measure getMinimumHeight() {
601     Object object = getStateHelper().eval(PropertyKeys.minimumHeight);
602     if (object != null) {
603        return Measure.valueOf(object);
604     }
605     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMinimumHeight(getFacesContext(), this) : Measure.ZERO;
606   }
607 
608   public void setMinimumHeight(org.apache.myfaces.tobago.layout.Measure minimumHeight) {
609     getStateHelper().put(PropertyKeys.minimumHeight, minimumHeight);
610   }
611 
612   /**
613   Only applicable in the case that the data model is a tree.
614    This flag indicates that the root node should be displayed.
615    Often in tree structures the root node is special and should not be displayed.
616   <br />Default: <code>false</code>
617   */
618   public boolean isShowRoot() {
619     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.showRoot);
620     if (bool != null) {
621       return bool;
622     }
623     return false;
624   }
625 
626   public void setShowRoot(boolean showRoot) {
627     getStateHelper().put(PropertyKeys.showRoot, showRoot);
628   }
629 
630   public java.lang.Integer getRowSpan() {
631     Number value  = (Number) getStateHelper().eval(PropertyKeys.rowSpan);
632     if (value != null) {
633       return value.intValue();
634     }
635     return 1;
636   }
637 
638   public void setRowSpan(java.lang.Integer rowSpan) {
639     getStateHelper().put(PropertyKeys.rowSpan, rowSpan);
640   }
641 
642   /**
643   This value will usually be set by the layout manager.
644 
645   */
646   public org.apache.myfaces.tobago.layout.Measure getLeft() {
647     Object object = getStateHelper().eval(PropertyKeys.left);
648     if (object != null) {
649        return Measure.valueOf(object);
650     }
651     return null;
652   }
653 
654   public void setLeft(org.apache.myfaces.tobago.layout.Measure left) {
655     getStateHelper().put(PropertyKeys.left, left);
656   }
657 
658   public java.lang.Integer getColumnSpan() {
659     Number value  = (Number) getStateHelper().eval(PropertyKeys.columnSpan);
660     if (value != null) {
661       return value.intValue();
662     }
663     return 1;
664   }
665 
666   public void setColumnSpan(java.lang.Integer columnSpan) {
667     getStateHelper().put(PropertyKeys.columnSpan, columnSpan);
668   }
669 
670   /**
671   This attribute is for internal use only.
672 
673   */
674   public org.apache.myfaces.tobago.layout.Measure getPaddingBottom() {
675     Object object = getStateHelper().eval(PropertyKeys.paddingBottom);
676     if (object != null) {
677        return Measure.valueOf(object);
678     }
679     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
680   getRenderer(getFacesContext())).getPaddingBottom(getFacesContext(), this) : Measure.ZERO;
681   }
682 
683   public void setPaddingBottom(org.apache.myfaces.tobago.layout.Measure paddingBottom) {
684     getStateHelper().put(PropertyKeys.paddingBottom, paddingBottom);
685   }
686 
687   /**
688   This value will usually be set by the layout manager.
689 
690   */
691   public org.apache.myfaces.tobago.layout.Measure getTop() {
692     Object object = getStateHelper().eval(PropertyKeys.top);
693     if (object != null) {
694        return Measure.valueOf(object);
695     }
696     return null;
697   }
698 
699   public void setTop(org.apache.myfaces.tobago.layout.Measure top) {
700     getStateHelper().put(PropertyKeys.top, top);
701   }
702 
703   /**
704   Flag indicating whether or not the range of displayed rows should
705    rendered in the sheet's footer. Rendering this range also offers the
706    capability to enter the index of the start row directly.
707   <br />Default: <code>left</code><br />Allowed Values: <code>left,center,right,none</code>
708   */
709   public java.lang.String getShowRowRange() {
710     java.lang.String showRowRange = (java.lang.String) getStateHelper().eval(PropertyKeys.showRowRange);
711     if (showRowRange != null) {
712       return showRowRange;
713     }
714     return "left";
715   }
716 
717   public void setShowRowRange(java.lang.String showRowRange) {
718     getStateHelper().put(PropertyKeys.showRowRange, showRowRange);
719   }
720 
721   public org.apache.myfaces.tobago.layout.Measure getMarginRight() {
722     Object object = getStateHelper().eval(PropertyKeys.marginRight);
723     if (object != null) {
724        return Measure.valueOf(object);
725     }
726     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginRight(getFacesContext(), this) : Measure.ZERO;
727   }
728 
729   public void setMarginRight(org.apache.myfaces.tobago.layout.Measure marginRight) {
730     getStateHelper().put(PropertyKeys.marginRight, marginRight);
731   }
732 
733   public org.apache.myfaces.tobago.layout.Measure getPreferredHeight() {
734     Object object = getStateHelper().eval(PropertyKeys.preferredHeight);
735     if (object != null) {
736        return Measure.valueOf(object);
737     }
738     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this) : Measure.ZERO;
739   }
740 
741   public void setPreferredHeight(org.apache.myfaces.tobago.layout.Measure preferredHeight) {
742     getStateHelper().put(PropertyKeys.preferredHeight, preferredHeight);
743   }
744 
745   public org.apache.myfaces.tobago.layout.Measure getMaximumWidth() {
746     Object object = getStateHelper().eval(PropertyKeys.maximumWidth);
747     if (object != null) {
748        return Measure.valueOf(object);
749     }
750     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this) : Measure.ZERO;
751   }
752 
753   public void setMaximumWidth(org.apache.myfaces.tobago.layout.Measure maximumWidth) {
754     getStateHelper().put(PropertyKeys.maximumWidth, maximumWidth);
755   }
756 
757   /**
758   This attribute is for internal use only.
759 
760   */
761   public org.apache.myfaces.tobago.layout.Measure getPaddingRight() {
762     Object object = getStateHelper().eval(PropertyKeys.paddingRight);
763     if (object != null) {
764        return Measure.valueOf(object);
765     }
766     return getRendererType() != null ? ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
767   getRenderer(getFacesContext())).getPaddingRight(getFacesContext(), this) : Measure.ZERO;
768   }
769 
770   public void setPaddingRight(org.apache.myfaces.tobago.layout.Measure paddingRight) {
771     getStateHelper().put(PropertyKeys.paddingRight, paddingRight);
772   }
773 
774   public org.apache.myfaces.tobago.layout.Measure getMarginBottom() {
775     Object object = getStateHelper().eval(PropertyKeys.marginBottom);
776     if (object != null) {
777        return Measure.valueOf(object);
778     }
779     return getRendererType() != null ? ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginBottom(getFacesContext(), this) : Measure.ZERO;
780   }
781 
782   public void setMarginBottom(org.apache.myfaces.tobago.layout.Measure marginBottom) {
783     getStateHelper().put(PropertyKeys.marginBottom, marginBottom);
784   }
785 
786   /**
787   Flag indicating whether or not the sheet should be selectable.
788   <br />Default: <code>multi</code><br />Allowed Values: <code>none,single,singleOrNone,multi</code>
789   */
790   public java.lang.String getSelectable() {
791     java.lang.String selectable = (java.lang.String) getStateHelper().eval(PropertyKeys.selectable);
792     if (selectable != null) {
793       return selectable;
794     }
795     return "multi";
796   }
797 
798   public void setSelectable(java.lang.String selectable) {
799     getStateHelper().put(PropertyKeys.selectable, selectable);
800   }
801 
802   /**
803   Flag indicating the header should be rendered.
804   <br />Default: <code>true</code>
805   */
806   public boolean isShowHeader() {
807     Boolean bool = (Boolean) getStateHelper().eval(PropertyKeys.showHeader);
808     if (bool != null) {
809       return bool;
810     }
811     return true;
812   }
813 
814   public void setShowHeader(boolean showHeader) {
815     getStateHelper().put(PropertyKeys.showHeader, showHeader);
816   }
817 
818   /**
819   The count of rendered direct paging links in the sheet's footer.<br />
820   <br />Default: <code>9</code>
821   */
822   public java.lang.Integer getDirectLinkCount() {
823     Number value  = (Number) getStateHelper().eval(PropertyKeys.directLinkCount);
824     if (value != null) {
825       return value.intValue();
826     }
827     return 9;
828   }
829 
830   public void setDirectLinkCount(java.lang.Integer directLinkCount) {
831     getStateHelper().put(PropertyKeys.directLinkCount, directLinkCount);
832   }
833 
834   /**
835    * @deprecated since 2.0.0
836    */
837   @Deprecated
838   public javax.faces.el.MethodBinding getSortActionListener() {
839     javax.el.MethodExpression expression = getSortActionListenerExpression();
840     if (expression instanceof MethodBindingToMethodExpression) {
841       return ((MethodBindingToMethodExpression)expression).getMethodBinding();
842     }
843     if (expression != null) {
844        return new MethodExpressionToMethodBinding(expression);
845     }
846     return null;
847   }
848 
849   /**
850    * @deprecated since 2.0.0
851    */
852   @Deprecated
853   public void setSortActionListener(javax.faces.el.MethodBinding sortActionListener) {
854     if (sortActionListener != null) {
855       setSortActionListenerExpression(new MethodBindingToMethodExpression(sortActionListener));
856     } else {
857       setSortActionListenerExpression(null);
858     }
859   }
860 
861   public javax.el.MethodExpression getSortActionListenerExpression() {
862     return (javax.el.MethodExpression) getStateHelper().eval(PropertyKeys.sortActionListener);
863   }
864 
865   public void setSortActionListenerExpression(javax.el.MethodExpression sortActionListener) {
866     getStateHelper().put(PropertyKeys.sortActionListener, sortActionListener);
867   }
868 
869 
870   /**
871   This attribute is for internal use only.
872 
873   */
874   public java.lang.Integer getHorizontalIndex() {
875     Number value  = (Number) getStateHelper().eval(PropertyKeys.horizontalIndex);
876     if (value != null) {
877       return value.intValue();
878     }
879     return null;
880   }
881 
882   public void setHorizontalIndex(java.lang.Integer horizontalIndex) {
883     getStateHelper().put(PropertyKeys.horizontalIndex, horizontalIndex);
884   }
885 
886   public Object saveState(FacesContext context) {
887     currentMarkup = null;
888     return super.saveState(context);
889   }
890 
891 
892 }