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