001    // ---------- Attention: Generated code, please do not modify! -----------  
002    
003    /*
004     * Licensed to the Apache Software Foundation (ASF) under one or more
005     * contributor license agreements.  See the NOTICE file distributed with
006     * this work for additional information regarding copyright ownership.
007     * The ASF licenses this file to You under the Apache License, Version 2.0
008     * (the "License"); you may not use this file except in compliance with
009     * the License.  You may obtain a copy of the License at
010     *
011     *      http://www.apache.org/licenses/LICENSE-2.0
012     *
013     * Unless required by applicable law or agreed to in writing, software
014     * distributed under the License is distributed on an "AS IS" BASIS,
015     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016     * See the License for the specific language governing permissions and
017     * limitations under the License.
018     */
019    
020    package org.apache.myfaces.tobago.component;
021    
022    import javax.faces.context.FacesContext;
023    import org.apache.myfaces.tobago.context.Markup;
024    import org.apache.myfaces.tobago.internal.component.AbstractUICell;
025    import org.apache.myfaces.tobago.layout.Display;
026    import org.apache.myfaces.tobago.layout.Measure;
027    import org.apache.commons.lang.ArrayUtils;
028    import org.apache.commons.lang.StringUtils;
029    import org.apache.myfaces.tobago.component.MethodBindingToMethodExpression;
030    import org.apache.myfaces.tobago.component.MethodExpressionToMethodBinding;
031    import org.apache.myfaces.tobago.internal.util.Deprecation;
032    import org.apache.myfaces.tobago.renderkit.MarginValues;
033    import org.apache.myfaces.tobago.renderkit.SpacingValues;
034    import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer;
035    import javax.el.ELException;
036    import javax.faces.FacesException;
037    import java.util.ArrayList;
038    import java.util.List;
039    import javax.el.MethodExpression;
040    import javax.el.ValueExpression;
041    
042    /** 
043     Renders a panel-like layout element with the ability to span over more than
044      one layout cell. A cell may only contain one child.
045      * UIComponent class, generated from template {@code component1.2.stg} with class
046      * {@link org.apache.myfaces.tobago.internal.taglib.component.CellTagDeclaration}.
047       @deprecated
048     */
049    @Deprecated
050    public class UICell
051        extends AbstractUICell implements SupportsMarkup {
052    
053      public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Cell";
054    
055      private org.apache.myfaces.tobago.context.Markup markup;
056      private org.apache.myfaces.tobago.layout.Measure marginLeft;
057      private org.apache.myfaces.tobago.layout.Measure minimumHeight;
058      private org.apache.myfaces.tobago.layout.Measure borderLeft;
059      private org.apache.myfaces.tobago.layout.Measure height;
060      private org.apache.myfaces.tobago.layout.Measure minimumWidth;
061      private java.lang.Boolean overflowX;
062      private java.lang.Boolean overflowY;
063      private org.apache.myfaces.tobago.layout.Measure left;
064      private org.apache.myfaces.tobago.layout.Measure borderRight;
065      private org.apache.myfaces.tobago.layout.Measure paddingBottom;
066      private org.apache.myfaces.tobago.layout.Measure maximumHeight;
067      private org.apache.myfaces.tobago.layout.Measure top;
068      private org.apache.myfaces.tobago.layout.Measure currentWidth;
069      private java.lang.String scrollbars;
070      private org.apache.myfaces.tobago.layout.Measure paddingTop;
071      private org.apache.myfaces.tobago.layout.Measure marginTop;
072      private org.apache.myfaces.tobago.layout.Measure marginRight;
073      private org.apache.myfaces.tobago.layout.Measure width;
074      private org.apache.myfaces.tobago.layout.Measure currentHeight;
075      private org.apache.myfaces.tobago.layout.Measure preferredHeight;
076      private org.apache.myfaces.tobago.layout.Display display;
077      private org.apache.myfaces.tobago.layout.Measure borderBottom;
078      private org.apache.myfaces.tobago.layout.Measure maximumWidth;
079      private org.apache.myfaces.tobago.layout.Measure paddingLeft;
080      private org.apache.myfaces.tobago.layout.Measure paddingRight;
081      private org.apache.myfaces.tobago.layout.Measure preferredWidth;
082      private org.apache.myfaces.tobago.layout.Measure marginBottom;
083      private java.lang.Integer verticalIndex;
084      private org.apache.myfaces.tobago.layout.Measure borderTop;
085      private java.lang.Integer spanX;
086      private java.lang.Integer spanY;
087      private org.apache.myfaces.tobago.context.Markup currentMarkup;
088      private java.lang.Integer horizontalIndex;
089    
090    
091      public org.apache.myfaces.tobago.context.Markup getMarkup() {
092        if (markup != null) {
093          return markup;
094        }
095        ValueExpression ve = getValueExpression("markup");
096        if (ve != null) {
097          try {
098            Object object = ve.getValue(getFacesContext().getELContext());
099            return Markup.valueOf(object);
100          } catch (ELException e) {
101                      throw new FacesException(e);
102              }
103        }
104        return null;
105      }
106    
107      public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) {
108        this.markup = markup;
109      }
110    
111      public org.apache.myfaces.tobago.layout.Measure getMarginLeft() {
112        if (marginLeft != null) {
113          return marginLeft;
114        }
115        ValueExpression ve = getValueExpression("marginLeft");
116        if (ve != null) {
117          try {
118            Object object = ve.getValue(getFacesContext().getELContext());
119            return Measure.valueOf(object);
120          } catch (ELException e) {
121                      throw new FacesException(e);
122              }
123        }
124        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginLeft(getFacesContext(), this);
125      }
126    
127      public void setMarginLeft(org.apache.myfaces.tobago.layout.Measure marginLeft) {
128        this.marginLeft = marginLeft;
129      }
130    
131      public org.apache.myfaces.tobago.layout.Measure getMinimumHeight() {
132        if (minimumHeight != null) {
133          return minimumHeight;
134        }
135        ValueExpression ve = getValueExpression("minimumHeight");
136        if (ve != null) {
137          try {
138            Object object = ve.getValue(getFacesContext().getELContext());
139            return Measure.valueOf(object);
140          } catch (ELException e) {
141                      throw new FacesException(e);
142              }
143        }
144        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMinimumHeight(getFacesContext(), this);
145      }
146    
147      public void setMinimumHeight(org.apache.myfaces.tobago.layout.Measure minimumHeight) {
148        this.minimumHeight = minimumHeight;
149      }
150    
151      /**
152      This attribute is for internal use only.
153    
154      */
155      public org.apache.myfaces.tobago.layout.Measure getBorderLeft() {
156        if (borderLeft != null) {
157          return borderLeft;
158        }
159        ValueExpression ve = getValueExpression("borderLeft");
160        if (ve != null) {
161          try {
162            Object object = ve.getValue(getFacesContext().getELContext());
163            return Measure.valueOf(object);
164          } catch (ELException e) {
165                      throw new FacesException(e);
166              }
167        }
168        return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
169      getRenderer(getFacesContext())).getBorderLeft(getFacesContext(), this);
170      }
171    
172      public void setBorderLeft(org.apache.myfaces.tobago.layout.Measure borderLeft) {
173        this.borderLeft = borderLeft;
174      }
175    
176      /**
177      This value will usually be set by the layout manager.
178    
179      */
180      public org.apache.myfaces.tobago.layout.Measure getHeight() {
181        if (height != null) {
182          return height;
183        }
184        ValueExpression ve = getValueExpression("height");
185        if (ve != null) {
186          try {
187            Object object = ve.getValue(getFacesContext().getELContext());
188            return Measure.valueOf(object);
189          } catch (ELException e) {
190                      throw new FacesException(e);
191              }
192        }
193        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getHeight(getFacesContext(), this);
194      }
195    
196      public void setHeight(org.apache.myfaces.tobago.layout.Measure height) {
197        this.height = height;
198      }
199    
200      public org.apache.myfaces.tobago.layout.Measure getMinimumWidth() {
201        if (minimumWidth != null) {
202          return minimumWidth;
203        }
204        ValueExpression ve = getValueExpression("minimumWidth");
205        if (ve != null) {
206          try {
207            Object object = ve.getValue(getFacesContext().getELContext());
208            return Measure.valueOf(object);
209          } catch (ELException e) {
210                      throw new FacesException(e);
211              }
212        }
213        return ((LayoutComponentRenderer)getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this);
214      }
215    
216      public void setMinimumWidth(org.apache.myfaces.tobago.layout.Measure minimumWidth) {
217        this.minimumWidth = minimumWidth;
218      }
219    
220      /**
221      This attribute is for internal use only.
222    
223      */
224      public boolean isOverflowX() {
225        if (overflowX != null) {
226          return overflowX;
227        }
228        ValueExpression ve = getValueExpression("overflowX");
229        if (ve != null) {
230          try {
231            Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext());
232            if (bool != null) {
233              return bool;
234            }
235          } catch (ELException e) {
236                      throw new FacesException(e);
237              }
238        }
239        return false;
240      }
241    
242      public void setOverflowX(boolean overflowX) {
243        this.overflowX = overflowX;
244      }
245    
246      /**
247      This attribute is for internal use only.
248    
249      */
250      public boolean isOverflowY() {
251        if (overflowY != null) {
252          return overflowY;
253        }
254        ValueExpression ve = getValueExpression("overflowY");
255        if (ve != null) {
256          try {
257            Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext());
258            if (bool != null) {
259              return bool;
260            }
261          } catch (ELException e) {
262                      throw new FacesException(e);
263              }
264        }
265        return false;
266      }
267    
268      public void setOverflowY(boolean overflowY) {
269        this.overflowY = overflowY;
270      }
271    
272      /**
273      This value will usually be set by the layout manager.
274    
275      */
276      public org.apache.myfaces.tobago.layout.Measure getLeft() {
277        if (left != null) {
278          return left;
279        }
280        ValueExpression ve = getValueExpression("left");
281        if (ve != null) {
282          try {
283            Object object = ve.getValue(getFacesContext().getELContext());
284            return Measure.valueOf(object);
285          } catch (ELException e) {
286                      throw new FacesException(e);
287              }
288        }
289        return null;
290      }
291    
292      public void setLeft(org.apache.myfaces.tobago.layout.Measure left) {
293        this.left = left;
294      }
295    
296      /**
297      This attribute is for internal use only.
298    
299      */
300      public org.apache.myfaces.tobago.layout.Measure getBorderRight() {
301        if (borderRight != null) {
302          return borderRight;
303        }
304        ValueExpression ve = getValueExpression("borderRight");
305        if (ve != null) {
306          try {
307            Object object = ve.getValue(getFacesContext().getELContext());
308            return Measure.valueOf(object);
309          } catch (ELException e) {
310                      throw new FacesException(e);
311              }
312        }
313        return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
314      getRenderer(getFacesContext())).getBorderRight(getFacesContext(), this);
315      }
316    
317      public void setBorderRight(org.apache.myfaces.tobago.layout.Measure borderRight) {
318        this.borderRight = borderRight;
319      }
320    
321      /**
322      This attribute is for internal use only.
323    
324      */
325      public org.apache.myfaces.tobago.layout.Measure getPaddingBottom() {
326        if (paddingBottom != null) {
327          return paddingBottom;
328        }
329        ValueExpression ve = getValueExpression("paddingBottom");
330        if (ve != null) {
331          try {
332            Object object = ve.getValue(getFacesContext().getELContext());
333            return Measure.valueOf(object);
334          } catch (ELException e) {
335                      throw new FacesException(e);
336              }
337        }
338        return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
339      getRenderer(getFacesContext())).getPaddingBottom(getFacesContext(), this);
340      }
341    
342      public void setPaddingBottom(org.apache.myfaces.tobago.layout.Measure paddingBottom) {
343        this.paddingBottom = paddingBottom;
344      }
345    
346      public org.apache.myfaces.tobago.layout.Measure getMaximumHeight() {
347        if (maximumHeight != null) {
348          return maximumHeight;
349        }
350        ValueExpression ve = getValueExpression("maximumHeight");
351        if (ve != null) {
352          try {
353            Object object = ve.getValue(getFacesContext().getELContext());
354            return Measure.valueOf(object);
355          } catch (ELException e) {
356                      throw new FacesException(e);
357              }
358        }
359        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this);
360      }
361    
362      public void setMaximumHeight(org.apache.myfaces.tobago.layout.Measure maximumHeight) {
363        this.maximumHeight = maximumHeight;
364      }
365    
366      /**
367      This value will usually be set by the layout manager.
368    
369      */
370      public org.apache.myfaces.tobago.layout.Measure getTop() {
371        if (top != null) {
372          return top;
373        }
374        ValueExpression ve = getValueExpression("top");
375        if (ve != null) {
376          try {
377            Object object = ve.getValue(getFacesContext().getELContext());
378            return Measure.valueOf(object);
379          } catch (ELException e) {
380                      throw new FacesException(e);
381              }
382        }
383        return null;
384      }
385    
386      public void setTop(org.apache.myfaces.tobago.layout.Measure top) {
387        this.top = top;
388      }
389    
390      /**
391      This value will usually be set by the layout manager. It holds the current width computed by the layout manager.
392    
393      */
394      public org.apache.myfaces.tobago.layout.Measure getCurrentWidth() {
395        if (currentWidth != null) {
396          return currentWidth;
397        }
398        ValueExpression ve = getValueExpression("currentWidth");
399        if (ve != null) {
400          try {
401            Object object = ve.getValue(getFacesContext().getELContext());
402            return Measure.valueOf(object);
403          } catch (ELException e) {
404                      throw new FacesException(e);
405              }
406        }
407        return getWidth();
408      }
409    
410      public void setCurrentWidth(org.apache.myfaces.tobago.layout.Measure currentWidth) {
411        this.currentWidth = currentWidth;
412      }
413    
414      /**
415      possible values are:
416       <ul>
417       <li>'false' : no scrollbars should be rendered</li>
418       <li>'true'  : scrollbars should always be rendered</li>
419       <li>'auto'  : scrollbars should be rendered when needed</li>
420       </ul>
421      <br />Default: <code>false</code><br />Allowed Values: <code>false,true,auto</code>
422      */
423      public java.lang.String getScrollbars() {
424        if (scrollbars != null) {
425          return scrollbars;
426        }
427        ValueExpression ve = getValueExpression("scrollbars");
428        if (ve != null) {
429          try {
430            java.lang.String scrollbars = (java.lang.String) ve.getValue(getFacesContext().getELContext());
431            if (scrollbars != null) {
432              return scrollbars;
433            }
434          } catch (ELException e) {
435                      throw new FacesException(e);
436              }
437        }
438        return "false";
439      }
440    
441      public void setScrollbars(java.lang.String scrollbars) {
442        this.scrollbars = scrollbars;
443      }
444    
445      /**
446      This attribute is for internal use only.
447    
448      */
449      public org.apache.myfaces.tobago.layout.Measure getPaddingTop() {
450        if (paddingTop != null) {
451          return paddingTop;
452        }
453        ValueExpression ve = getValueExpression("paddingTop");
454        if (ve != null) {
455          try {
456            Object object = ve.getValue(getFacesContext().getELContext());
457            return Measure.valueOf(object);
458          } catch (ELException e) {
459                      throw new FacesException(e);
460              }
461        }
462        return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
463      getRenderer(getFacesContext())).getPaddingTop(getFacesContext(), this);
464      }
465    
466      public void setPaddingTop(org.apache.myfaces.tobago.layout.Measure paddingTop) {
467        this.paddingTop = paddingTop;
468      }
469    
470      public org.apache.myfaces.tobago.layout.Measure getMarginTop() {
471        if (marginTop != null) {
472          return marginTop;
473        }
474        ValueExpression ve = getValueExpression("marginTop");
475        if (ve != null) {
476          try {
477            Object object = ve.getValue(getFacesContext().getELContext());
478            return Measure.valueOf(object);
479          } catch (ELException e) {
480                      throw new FacesException(e);
481              }
482        }
483        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginTop(getFacesContext(), this);
484      }
485    
486      public void setMarginTop(org.apache.myfaces.tobago.layout.Measure marginTop) {
487        this.marginTop = marginTop;
488      }
489    
490      public org.apache.myfaces.tobago.layout.Measure getMarginRight() {
491        if (marginRight != null) {
492          return marginRight;
493        }
494        ValueExpression ve = getValueExpression("marginRight");
495        if (ve != null) {
496          try {
497            Object object = ve.getValue(getFacesContext().getELContext());
498            return Measure.valueOf(object);
499          } catch (ELException e) {
500                      throw new FacesException(e);
501              }
502        }
503        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginRight(getFacesContext(), this);
504      }
505    
506      public void setMarginRight(org.apache.myfaces.tobago.layout.Measure marginRight) {
507        this.marginRight = marginRight;
508      }
509    
510      /**
511      This value will usually be set by the layout manager.
512    
513      */
514      public org.apache.myfaces.tobago.layout.Measure getWidth() {
515        if (width != null) {
516          return width;
517        }
518        ValueExpression ve = getValueExpression("width");
519        if (ve != null) {
520          try {
521            Object object = ve.getValue(getFacesContext().getELContext());
522            return Measure.valueOf(object);
523          } catch (ELException e) {
524                      throw new FacesException(e);
525              }
526        }
527        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getWidth(getFacesContext(), this);
528      }
529    
530      public void setWidth(org.apache.myfaces.tobago.layout.Measure width) {
531        this.width = width;
532      }
533    
534      /**
535      This value will usually be set by the layout manager. It holds the current height computed by the layout manager.
536    
537      */
538      public org.apache.myfaces.tobago.layout.Measure getCurrentHeight() {
539        if (currentHeight != null) {
540          return currentHeight;
541        }
542        ValueExpression ve = getValueExpression("currentHeight");
543        if (ve != null) {
544          try {
545            Object object = ve.getValue(getFacesContext().getELContext());
546            return Measure.valueOf(object);
547          } catch (ELException e) {
548                      throw new FacesException(e);
549              }
550        }
551        return getHeight();
552      }
553    
554      public void setCurrentHeight(org.apache.myfaces.tobago.layout.Measure currentHeight) {
555        this.currentHeight = currentHeight;
556      }
557    
558      public org.apache.myfaces.tobago.layout.Measure getPreferredHeight() {
559        if (preferredHeight != null) {
560          return preferredHeight;
561        }
562        ValueExpression ve = getValueExpression("preferredHeight");
563        if (ve != null) {
564          try {
565            Object object = ve.getValue(getFacesContext().getELContext());
566            return Measure.valueOf(object);
567          } catch (ELException e) {
568                      throw new FacesException(e);
569              }
570        }
571        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this);
572      }
573    
574      public void setPreferredHeight(org.apache.myfaces.tobago.layout.Measure preferredHeight) {
575        this.preferredHeight = preferredHeight;
576      }
577    
578      /**
579      This attribute is for internal use only.
580    
581      */
582      public org.apache.myfaces.tobago.layout.Display getDisplay() {
583        if (display != null) {
584          return display;
585        }
586        ValueExpression ve = getValueExpression("display");
587        if (ve != null) {
588          try {
589            return (org.apache.myfaces.tobago.layout.Display) ve.getValue(getFacesContext().getELContext());
590          } catch (ELException e) {
591                      throw new FacesException(e);
592              }
593        }
594        return null;
595      }
596    
597      public void setDisplay(org.apache.myfaces.tobago.layout.Display display) {
598        this.display = display;
599      }
600    
601      /**
602      This attribute is for internal use only.
603    
604      */
605      public org.apache.myfaces.tobago.layout.Measure getBorderBottom() {
606        if (borderBottom != null) {
607          return borderBottom;
608        }
609        ValueExpression ve = getValueExpression("borderBottom");
610        if (ve != null) {
611          try {
612            Object object = ve.getValue(getFacesContext().getELContext());
613            return Measure.valueOf(object);
614          } catch (ELException e) {
615                      throw new FacesException(e);
616              }
617        }
618        return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
619      getRenderer(getFacesContext())).getBorderBottom(getFacesContext(), this);
620      }
621    
622      public void setBorderBottom(org.apache.myfaces.tobago.layout.Measure borderBottom) {
623        this.borderBottom = borderBottom;
624      }
625    
626      public org.apache.myfaces.tobago.layout.Measure getMaximumWidth() {
627        if (maximumWidth != null) {
628          return maximumWidth;
629        }
630        ValueExpression ve = getValueExpression("maximumWidth");
631        if (ve != null) {
632          try {
633            Object object = ve.getValue(getFacesContext().getELContext());
634            return Measure.valueOf(object);
635          } catch (ELException e) {
636                      throw new FacesException(e);
637              }
638        }
639        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this);
640      }
641    
642      public void setMaximumWidth(org.apache.myfaces.tobago.layout.Measure maximumWidth) {
643        this.maximumWidth = maximumWidth;
644      }
645    
646      /**
647      This attribute is for internal use only.
648    
649      */
650      public org.apache.myfaces.tobago.layout.Measure getPaddingLeft() {
651        if (paddingLeft != null) {
652          return paddingLeft;
653        }
654        ValueExpression ve = getValueExpression("paddingLeft");
655        if (ve != null) {
656          try {
657            Object object = ve.getValue(getFacesContext().getELContext());
658            return Measure.valueOf(object);
659          } catch (ELException e) {
660                      throw new FacesException(e);
661              }
662        }
663        return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
664      getRenderer(getFacesContext())).getPaddingLeft(getFacesContext(), this);
665      }
666    
667      public void setPaddingLeft(org.apache.myfaces.tobago.layout.Measure paddingLeft) {
668        this.paddingLeft = paddingLeft;
669      }
670    
671      /**
672      This attribute is for internal use only.
673    
674      */
675      public org.apache.myfaces.tobago.layout.Measure getPaddingRight() {
676        if (paddingRight != null) {
677          return paddingRight;
678        }
679        ValueExpression ve = getValueExpression("paddingRight");
680        if (ve != null) {
681          try {
682            Object object = ve.getValue(getFacesContext().getELContext());
683            return Measure.valueOf(object);
684          } catch (ELException e) {
685                      throw new FacesException(e);
686              }
687        }
688        return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
689      getRenderer(getFacesContext())).getPaddingRight(getFacesContext(), this);
690      }
691    
692      public void setPaddingRight(org.apache.myfaces.tobago.layout.Measure paddingRight) {
693        this.paddingRight = paddingRight;
694      }
695    
696      public org.apache.myfaces.tobago.layout.Measure getPreferredWidth() {
697        if (preferredWidth != null) {
698          return preferredWidth;
699        }
700        ValueExpression ve = getValueExpression("preferredWidth");
701        if (ve != null) {
702          try {
703            Object object = ve.getValue(getFacesContext().getELContext());
704            return Measure.valueOf(object);
705          } catch (ELException e) {
706                      throw new FacesException(e);
707              }
708        }
709        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this);
710      }
711    
712      public void setPreferredWidth(org.apache.myfaces.tobago.layout.Measure preferredWidth) {
713        this.preferredWidth = preferredWidth;
714      }
715    
716      public org.apache.myfaces.tobago.layout.Measure getMarginBottom() {
717        if (marginBottom != null) {
718          return marginBottom;
719        }
720        ValueExpression ve = getValueExpression("marginBottom");
721        if (ve != null) {
722          try {
723            Object object = ve.getValue(getFacesContext().getELContext());
724            return Measure.valueOf(object);
725          } catch (ELException e) {
726                      throw new FacesException(e);
727              }
728        }
729        return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginBottom(getFacesContext(), this);
730      }
731    
732      public void setMarginBottom(org.apache.myfaces.tobago.layout.Measure marginBottom) {
733        this.marginBottom = marginBottom;
734      }
735    
736      /**
737      This attribute is for internal use only.
738    
739      */
740      public java.lang.Integer getVerticalIndex() {
741        if (verticalIndex != null) {
742          return verticalIndex;
743        }
744        ValueExpression ve = getValueExpression("verticalIndex");
745        if (ve != null) {
746          try {
747            Number number = (Number) ve.getValue(getFacesContext().getELContext());
748            if (number != null) {
749              return number.intValue();
750            }
751          } catch (ELException e) {
752                      throw new FacesException(e);
753              }
754        }
755        return null;
756      }
757    
758      public void setVerticalIndex(java.lang.Integer verticalIndex) {
759        this.verticalIndex = verticalIndex;
760      }
761    
762      /**
763      This attribute is for internal use only.
764    
765      */
766      public org.apache.myfaces.tobago.layout.Measure getBorderTop() {
767        if (borderTop != null) {
768          return borderTop;
769        }
770        ValueExpression ve = getValueExpression("borderTop");
771        if (ve != null) {
772          try {
773            Object object = ve.getValue(getFacesContext().getELContext());
774            return Measure.valueOf(object);
775          } catch (ELException e) {
776                      throw new FacesException(e);
777              }
778        }
779        return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
780      getRenderer(getFacesContext())).getBorderTop(getFacesContext(), this);
781      }
782    
783      public void setBorderTop(org.apache.myfaces.tobago.layout.Measure borderTop) {
784        this.borderTop = borderTop;
785      }
786    
787      /**
788      Count of layout columns to span over.
789      <br />Default: <code>1</code>
790      */
791      public java.lang.Integer getSpanX() {
792        if (spanX != null) {
793          return spanX;
794        }
795        ValueExpression ve = getValueExpression("spanX");
796        if (ve != null) {
797          try {
798            Number number = (Number) ve.getValue(getFacesContext().getELContext());
799            if (number != null) {
800              return number.intValue();
801            }
802          } catch (ELException e) {
803                      throw new FacesException(e);
804              }
805        }
806        return 1;
807      }
808    
809      public void setSpanX(java.lang.Integer spanX) {
810        this.spanX = spanX;
811      }
812    
813      /**
814      Count of layout rows to span over.
815      <br />Default: <code>1</code>
816      */
817      public java.lang.Integer getSpanY() {
818        if (spanY != null) {
819          return spanY;
820        }
821        ValueExpression ve = getValueExpression("spanY");
822        if (ve != null) {
823          try {
824            Number number = (Number) ve.getValue(getFacesContext().getELContext());
825            if (number != null) {
826              return number.intValue();
827            }
828          } catch (ELException e) {
829                      throw new FacesException(e);
830              }
831        }
832        return 1;
833      }
834    
835      public void setSpanY(java.lang.Integer spanY) {
836        this.spanY = spanY;
837      }
838    
839      public org.apache.myfaces.tobago.context.Markup getCurrentMarkup() {
840        if (currentMarkup != null) {
841          return currentMarkup;
842        }
843        return null;
844      }
845    
846      public void setCurrentMarkup(org.apache.myfaces.tobago.context.Markup currentMarkup) {
847        this.currentMarkup = currentMarkup;
848      }
849    
850      /**
851      This attribute is for internal use only.
852    
853      */
854      public java.lang.Integer getHorizontalIndex() {
855        if (horizontalIndex != null) {
856          return horizontalIndex;
857        }
858        ValueExpression ve = getValueExpression("horizontalIndex");
859        if (ve != null) {
860          try {
861            Number number = (Number) ve.getValue(getFacesContext().getELContext());
862            if (number != null) {
863              return number.intValue();
864            }
865          } catch (ELException e) {
866                      throw new FacesException(e);
867              }
868        }
869        return null;
870      }
871    
872      public void setHorizontalIndex(java.lang.Integer horizontalIndex) {
873        this.horizontalIndex = horizontalIndex;
874      }
875    
876      public void restoreState(FacesContext context, Object componentState) {
877        Object[] values = (Object[]) componentState;
878        super.restoreState(context, values[0]);
879        markup = (org.apache.myfaces.tobago.context.Markup) values[1];
880        marginLeft = (org.apache.myfaces.tobago.layout.Measure) values[2];
881        minimumHeight = (org.apache.myfaces.tobago.layout.Measure) values[3];
882        borderLeft = (org.apache.myfaces.tobago.layout.Measure) values[4];
883        height = (org.apache.myfaces.tobago.layout.Measure) values[5];
884        minimumWidth = (org.apache.myfaces.tobago.layout.Measure) values[6];
885        overflowX = (java.lang.Boolean) values[7];
886        overflowY = (java.lang.Boolean) values[8];
887        left = (org.apache.myfaces.tobago.layout.Measure) values[9];
888        borderRight = (org.apache.myfaces.tobago.layout.Measure) values[10];
889        paddingBottom = (org.apache.myfaces.tobago.layout.Measure) values[11];
890        maximumHeight = (org.apache.myfaces.tobago.layout.Measure) values[12];
891        top = (org.apache.myfaces.tobago.layout.Measure) values[13];
892        currentWidth = (org.apache.myfaces.tobago.layout.Measure) values[14];
893        scrollbars = (java.lang.String) values[15];
894        paddingTop = (org.apache.myfaces.tobago.layout.Measure) values[16];
895        marginTop = (org.apache.myfaces.tobago.layout.Measure) values[17];
896        marginRight = (org.apache.myfaces.tobago.layout.Measure) values[18];
897        width = (org.apache.myfaces.tobago.layout.Measure) values[19];
898        currentHeight = (org.apache.myfaces.tobago.layout.Measure) values[20];
899        preferredHeight = (org.apache.myfaces.tobago.layout.Measure) values[21];
900        display = (org.apache.myfaces.tobago.layout.Display) values[22];
901        borderBottom = (org.apache.myfaces.tobago.layout.Measure) values[23];
902        maximumWidth = (org.apache.myfaces.tobago.layout.Measure) values[24];
903        paddingLeft = (org.apache.myfaces.tobago.layout.Measure) values[25];
904        paddingRight = (org.apache.myfaces.tobago.layout.Measure) values[26];
905        preferredWidth = (org.apache.myfaces.tobago.layout.Measure) values[27];
906        marginBottom = (org.apache.myfaces.tobago.layout.Measure) values[28];
907        verticalIndex = (java.lang.Integer) values[29];
908        borderTop = (org.apache.myfaces.tobago.layout.Measure) values[30];
909        spanX = (java.lang.Integer) values[31];
910        spanY = (java.lang.Integer) values[32];
911        horizontalIndex = (java.lang.Integer) values[33];
912      }
913    
914      public Object saveState(FacesContext context) {
915        Object[] values = new Object[34];
916        values[0] = super.saveState(context);
917        values[1] = markup;
918        values[2] = marginLeft;
919        values[3] = minimumHeight;
920        values[4] = borderLeft;
921        values[5] = height;
922        values[6] = minimumWidth;
923        values[7] = overflowX;
924        values[8] = overflowY;
925        values[9] = left;
926        values[10] = borderRight;
927        values[11] = paddingBottom;
928        values[12] = maximumHeight;
929        values[13] = top;
930        values[14] = currentWidth;
931        values[15] = scrollbars;
932        values[16] = paddingTop;
933        values[17] = marginTop;
934        values[18] = marginRight;
935        values[19] = width;
936        values[20] = currentHeight;
937        values[21] = preferredHeight;
938        values[22] = display;
939        values[23] = borderBottom;
940        values[24] = maximumWidth;
941        values[25] = paddingLeft;
942        values[26] = paddingRight;
943        values[27] = preferredWidth;
944        values[28] = marginBottom;
945        values[29] = verticalIndex;
946        values[30] = borderTop;
947        values[31] = spanX;
948        values[32] = spanY;
949        values[33] = horizontalIndex;
950        currentMarkup = null;
951        return values;
952      }
953    
954    
955    }