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