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