Package org.apache.myfaces.tobago.component

Source Code of org.apache.myfaces.tobago.component.UITabGroup

// ---------- Attention: Generated code, please do not modify! ----------- 

/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements.  See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.myfaces.tobago.component;

import javax.faces.component.ActionSource;
import javax.faces.component.ActionSource2;
import javax.faces.context.FacesContext;
import javax.faces.el.MethodBinding;
import org.apache.myfaces.tobago.context.Markup;
import org.apache.myfaces.tobago.internal.component.AbstractUITabGroup;
import org.apache.myfaces.tobago.layout.Display;
import org.apache.myfaces.tobago.layout.Measure;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.myfaces.tobago.component.MethodBindingToMethodExpression;
import org.apache.myfaces.tobago.component.MethodExpressionToMethodBinding;
import org.apache.myfaces.tobago.internal.util.Deprecation;
import org.apache.myfaces.tobago.renderkit.MarginValues;
import org.apache.myfaces.tobago.renderkit.SpacingValues;
import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer;
import javax.el.ELException;
import javax.faces.FacesException;
import java.util.ArrayList;
import java.util.List;
import javax.el.MethodExpression;
import javax.el.ValueExpression;

/**
Renders a tab group which contains tab panels.
  * UIComponent class, generated from template {@code component1.2.stg} with class
  * {@link org.apache.myfaces.tobago.internal.taglib.component.TabGroupTagDeclaration}.
*/
public class UITabGroup
    extends AbstractUITabGroup implements ActionSource, ActionSource2, SupportsMarkup {

  public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.TabGroup";

  private javax.faces.el.MethodBinding actionListener;
  private org.apache.myfaces.tobago.context.Markup markup;
  private java.lang.Integer renderedIndex;
  private org.apache.myfaces.tobago.layout.Measure marginLeft;
  private org.apache.myfaces.tobago.layout.Measure minimumHeight;
  private org.apache.myfaces.tobago.layout.Measure borderLeft;
  private org.apache.myfaces.tobago.layout.Measure height;
  private org.apache.myfaces.tobago.layout.Measure minimumWidth;
  private java.lang.Boolean overflowX;

  private javax.el.MethodExpression actionExpression;
  private java.lang.Integer rowSpan;
  private java.lang.Boolean overflowY;
  private org.apache.myfaces.tobago.layout.Measure left;
  private java.lang.Integer columnSpan;
  private org.apache.myfaces.tobago.layout.Measure borderRight;
  private java.lang.Boolean showNavigationBar;
  private org.apache.myfaces.tobago.layout.Measure paddingBottom;
  private javax.faces.el.MethodBinding tabChangeListener;
  private org.apache.myfaces.tobago.layout.Measure maximumHeight;
  private org.apache.myfaces.tobago.layout.Measure top;
  private org.apache.myfaces.tobago.layout.Measure currentWidth;
  private java.lang.Integer selectedIndex;
  private org.apache.myfaces.tobago.layout.Measure paddingTop;
  private org.apache.myfaces.tobago.layout.Measure marginTop;
  private org.apache.myfaces.tobago.layout.Measure width;
  private org.apache.myfaces.tobago.layout.Measure marginRight;
  private org.apache.myfaces.tobago.layout.Measure currentHeight;
  private org.apache.myfaces.tobago.layout.Measure preferredHeight;
  private org.apache.myfaces.tobago.layout.Measure borderBottom;
  private org.apache.myfaces.tobago.layout.Display display;
  private org.apache.myfaces.tobago.layout.Measure maximumWidth;
  private org.apache.myfaces.tobago.layout.Measure paddingLeft;
  private org.apache.myfaces.tobago.layout.Measure paddingRight;
  private org.apache.myfaces.tobago.layout.Measure preferredWidth;
  private java.lang.String switchType;
  private org.apache.myfaces.tobago.layout.Measure marginBottom;
  private java.lang.Boolean immediate;
  private org.apache.myfaces.tobago.layout.Measure borderTop;
  private java.lang.Integer verticalIndex;
  private java.lang.String[] renderedPartially;
  private org.apache.myfaces.tobago.context.Markup currentMarkup;
  private java.lang.Integer horizontalIndex;


  public javax.faces.el.MethodBinding getActionListener() {
    return actionListener;
  }

  public void setActionListener(javax.faces.el.MethodBinding actionListener) {
    this.actionListener = actionListener;
  }

  public org.apache.myfaces.tobago.context.Markup getMarkup() {
    if (markup != null) {
      return markup;
    }
    ValueExpression ve = getValueExpression("markup");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Markup.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return null;
  }

  public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) {
    this.markup = markup;
  }

  /**
  For internal use. TODO: Check if this long needed
  <br />Default: <code>0</code>
  */
  public java.lang.Integer getRenderedIndex() {
    if (renderedIndex != null) {
      return renderedIndex;
    }
    ValueExpression ve = getValueExpression("renderedIndex");
    if (ve != null) {
      try {
        Number number = (Number) ve.getValue(getFacesContext().getELContext());
        if (number != null) {
          return number.intValue();
        }
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return 0;
  }

  public void setRenderedIndex(java.lang.Integer renderedIndex) {
    this.renderedIndex = renderedIndex;
  }

  public org.apache.myfaces.tobago.layout.Measure getMarginLeft() {
    if (marginLeft != null) {
      return marginLeft;
    }
    ValueExpression ve = getValueExpression("marginLeft");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginLeft(getFacesContext(), this);
  }

  public void setMarginLeft(org.apache.myfaces.tobago.layout.Measure marginLeft) {
    this.marginLeft = marginLeft;
  }

  public org.apache.myfaces.tobago.layout.Measure getMinimumHeight() {
    if (minimumHeight != null) {
      return minimumHeight;
    }
    ValueExpression ve = getValueExpression("minimumHeight");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMinimumHeight(getFacesContext(), this);
  }

  public void setMinimumHeight(org.apache.myfaces.tobago.layout.Measure minimumHeight) {
    this.minimumHeight = minimumHeight;
  }

  /**
  This attribute is for internal use only.

  */
  public org.apache.myfaces.tobago.layout.Measure getBorderLeft() {
    if (borderLeft != null) {
      return borderLeft;
    }
    ValueExpression ve = getValueExpression("borderLeft");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
  getRenderer(getFacesContext())).getBorderLeft(getFacesContext(), this);
  }

  public void setBorderLeft(org.apache.myfaces.tobago.layout.Measure borderLeft) {
    this.borderLeft = borderLeft;
  }

  /**
  This value will usually be set by the layout manager.

  */
  public org.apache.myfaces.tobago.layout.Measure getHeight() {
    if (height != null) {
      return height;
    }
    ValueExpression ve = getValueExpression("height");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getHeight(getFacesContext(), this);
  }

  public void setHeight(org.apache.myfaces.tobago.layout.Measure height) {
    this.height = height;
  }

  public org.apache.myfaces.tobago.layout.Measure getMinimumWidth() {
    if (minimumWidth != null) {
      return minimumWidth;
    }
    ValueExpression ve = getValueExpression("minimumWidth");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((LayoutComponentRenderer)getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this);
  }

  public void setMinimumWidth(org.apache.myfaces.tobago.layout.Measure minimumWidth) {
    this.minimumWidth = minimumWidth;
  }

  /**
  This attribute is for internal use only.

  */
  public boolean isOverflowX() {
    if (overflowX != null) {
      return overflowX;
    }
    ValueExpression ve = getValueExpression("overflowX");
    if (ve != null) {
      try {
        Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext());
        if (bool != null) {
          return bool;
        }
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return false;
  }

  public void setOverflowX(boolean overflowX) {
    this.overflowX = overflowX;
  }

  public javax.faces.el.MethodBinding getAction() {
    MethodExpression expression = getActionExpression();
    if (expression instanceof MethodBindingToMethodExpression) {
      return ((MethodBindingToMethodExpression)expression).getMethodBinding();
    }
    if (expression != null) {
       return new MethodExpressionToMethodBinding(expression);
    }
    return null;
  }

  public void setAction(javax.faces.el.MethodBinding action) {
    if (action != null) {
      setActionExpression(new MethodBindingToMethodExpression(action));
    } else {
      setActionExpression(null);
    }
  }

  public javax.el.MethodExpression getActionExpression() {
    return actionExpression;
  }

  public void setActionExpression(javax.el.MethodExpression actionExpression) {
    this.actionExpression = actionExpression;
  }

  public java.lang.Integer getRowSpan() {
    if (rowSpan != null) {
      return rowSpan;
    }
    ValueExpression ve = getValueExpression("rowSpan");
    if (ve != null) {
      try {
        Number number = (Number) ve.getValue(getFacesContext().getELContext());
        if (number != null) {
          return number.intValue();
        }
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return 1;
  }

  public void setRowSpan(java.lang.Integer rowSpan) {
    this.rowSpan = rowSpan;
  }

  /**
  This attribute is for internal use only.

  */
  public boolean isOverflowY() {
    if (overflowY != null) {
      return overflowY;
    }
    ValueExpression ve = getValueExpression("overflowY");
    if (ve != null) {
      try {
        Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext());
        if (bool != null) {
          return bool;
        }
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return false;
  }

  public void setOverflowY(boolean overflowY) {
    this.overflowY = overflowY;
  }

  /**
  This value will usually be set by the layout manager.

  */
  public org.apache.myfaces.tobago.layout.Measure getLeft() {
    if (left != null) {
      return left;
    }
    ValueExpression ve = getValueExpression("left");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return null;
  }

  public void setLeft(org.apache.myfaces.tobago.layout.Measure left) {
    this.left = left;
  }

  public java.lang.Integer getColumnSpan() {
    if (columnSpan != null) {
      return columnSpan;
    }
    ValueExpression ve = getValueExpression("columnSpan");
    if (ve != null) {
      try {
        Number number = (Number) ve.getValue(getFacesContext().getELContext());
        if (number != null) {
          return number.intValue();
        }
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return 1;
  }

  public void setColumnSpan(java.lang.Integer columnSpan) {
    this.columnSpan = columnSpan;
  }

  /**
  This attribute is for internal use only.

  */
  public org.apache.myfaces.tobago.layout.Measure getBorderRight() {
    if (borderRight != null) {
      return borderRight;
    }
    ValueExpression ve = getValueExpression("borderRight");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
  getRenderer(getFacesContext())).getBorderRight(getFacesContext(), this);
  }

  public void setBorderRight(org.apache.myfaces.tobago.layout.Measure borderRight) {
    this.borderRight = borderRight;
  }

  /**
  Flag indicating that the tab navigation bar is rendered.
  <br />Default: <code>true</code>
  */
  public boolean isShowNavigationBar() {
    if (showNavigationBar != null) {
      return showNavigationBar;
    }
    ValueExpression ve = getValueExpression("showNavigationBar");
    if (ve != null) {
      try {
        Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext());
        if (bool != null) {
          return bool;
        }
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return true;
  }

  public void setShowNavigationBar(boolean showNavigationBar) {
    this.showNavigationBar = showNavigationBar;
  }

  /**
  This attribute is for internal use only.

  */
  public org.apache.myfaces.tobago.layout.Measure getPaddingBottom() {
    if (paddingBottom != null) {
      return paddingBottom;
    }
    ValueExpression ve = getValueExpression("paddingBottom");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
  getRenderer(getFacesContext())).getPaddingBottom(getFacesContext(), this);
  }

  public void setPaddingBottom(org.apache.myfaces.tobago.layout.Measure paddingBottom) {
    this.paddingBottom = paddingBottom;
  }

  public javax.faces.el.MethodBinding getTabChangeListener() {
    return tabChangeListener;
  }

  public void setTabChangeListener(javax.faces.el.MethodBinding tabChangeListener) {
    this.tabChangeListener = tabChangeListener;
  }

  public org.apache.myfaces.tobago.layout.Measure getMaximumHeight() {
    if (maximumHeight != null) {
      return maximumHeight;
    }
    ValueExpression ve = getValueExpression("maximumHeight");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this);
  }

  public void setMaximumHeight(org.apache.myfaces.tobago.layout.Measure maximumHeight) {
    this.maximumHeight = maximumHeight;
  }

  /**
  This value will usually be set by the layout manager.

  */
  public org.apache.myfaces.tobago.layout.Measure getTop() {
    if (top != null) {
      return top;
    }
    ValueExpression ve = getValueExpression("top");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return null;
  }

  public void setTop(org.apache.myfaces.tobago.layout.Measure top) {
    this.top = top;
  }

  /**
  This value will usually be set by the layout manager. It holds the current width computed by the layout manager.

  */
  public org.apache.myfaces.tobago.layout.Measure getCurrentWidth() {
    if (currentWidth != null) {
      return currentWidth;
    }
    ValueExpression ve = getValueExpression("currentWidth");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return getWidth();
  }

  public void setCurrentWidth(org.apache.myfaces.tobago.layout.Measure currentWidth) {
    this.currentWidth = currentWidth;
  }

  /**
  <strong>ValueBindingExpression</strong> pointing to a Integer to save the
   component's selected Tab.
  <br />Default: <code>0</code>
  */
  public java.lang.Integer getSelectedIndex() {
    if (selectedIndex != null) {
      return selectedIndex;
    }
    ValueExpression ve = getValueExpression("selectedIndex");
    if (ve != null) {
      try {
        Number number = (Number) ve.getValue(getFacesContext().getELContext());
        if (number != null) {
          return number.intValue();
        }
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return 0;
  }

  public void setSelectedIndex(java.lang.Integer selectedIndex) {
    this.selectedIndex = selectedIndex;
  }

  /**
  This attribute is for internal use only.

  */
  public org.apache.myfaces.tobago.layout.Measure getPaddingTop() {
    if (paddingTop != null) {
      return paddingTop;
    }
    ValueExpression ve = getValueExpression("paddingTop");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
  getRenderer(getFacesContext())).getPaddingTop(getFacesContext(), this);
  }

  public void setPaddingTop(org.apache.myfaces.tobago.layout.Measure paddingTop) {
    this.paddingTop = paddingTop;
  }

  public org.apache.myfaces.tobago.layout.Measure getMarginTop() {
    if (marginTop != null) {
      return marginTop;
    }
    ValueExpression ve = getValueExpression("marginTop");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginTop(getFacesContext(), this);
  }

  public void setMarginTop(org.apache.myfaces.tobago.layout.Measure marginTop) {
    this.marginTop = marginTop;
  }

  /**
  This value will usually be set by the layout manager.

  */
  public org.apache.myfaces.tobago.layout.Measure getWidth() {
    if (width != null) {
      return width;
    }
    ValueExpression ve = getValueExpression("width");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getWidth(getFacesContext(), this);
  }

  public void setWidth(org.apache.myfaces.tobago.layout.Measure width) {
    this.width = width;
  }

  public org.apache.myfaces.tobago.layout.Measure getMarginRight() {
    if (marginRight != null) {
      return marginRight;
    }
    ValueExpression ve = getValueExpression("marginRight");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginRight(getFacesContext(), this);
  }

  public void setMarginRight(org.apache.myfaces.tobago.layout.Measure marginRight) {
    this.marginRight = marginRight;
  }

  /**
  This value will usually be set by the layout manager. It holds the current height computed by the layout manager.

  */
  public org.apache.myfaces.tobago.layout.Measure getCurrentHeight() {
    if (currentHeight != null) {
      return currentHeight;
    }
    ValueExpression ve = getValueExpression("currentHeight");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return getHeight();
  }

  public void setCurrentHeight(org.apache.myfaces.tobago.layout.Measure currentHeight) {
    this.currentHeight = currentHeight;
  }

  public org.apache.myfaces.tobago.layout.Measure getPreferredHeight() {
    if (preferredHeight != null) {
      return preferredHeight;
    }
    ValueExpression ve = getValueExpression("preferredHeight");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this);
  }

  public void setPreferredHeight(org.apache.myfaces.tobago.layout.Measure preferredHeight) {
    this.preferredHeight = preferredHeight;
  }

  /**
  This attribute is for internal use only.

  */
  public org.apache.myfaces.tobago.layout.Measure getBorderBottom() {
    if (borderBottom != null) {
      return borderBottom;
    }
    ValueExpression ve = getValueExpression("borderBottom");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
  getRenderer(getFacesContext())).getBorderBottom(getFacesContext(), this);
  }

  public void setBorderBottom(org.apache.myfaces.tobago.layout.Measure borderBottom) {
    this.borderBottom = borderBottom;
  }

  /**
  This attribute is for internal use only.

  */
  public org.apache.myfaces.tobago.layout.Display getDisplay() {
    if (display != null) {
      return display;
    }
    ValueExpression ve = getValueExpression("display");
    if (ve != null) {
      try {
        return (org.apache.myfaces.tobago.layout.Display) ve.getValue(getFacesContext().getELContext());
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return null;
  }

  public void setDisplay(org.apache.myfaces.tobago.layout.Display display) {
    this.display = display;
  }

  public org.apache.myfaces.tobago.layout.Measure getMaximumWidth() {
    if (maximumWidth != null) {
      return maximumWidth;
    }
    ValueExpression ve = getValueExpression("maximumWidth");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this);
  }

  public void setMaximumWidth(org.apache.myfaces.tobago.layout.Measure maximumWidth) {
    this.maximumWidth = maximumWidth;
  }

  /**
  This attribute is for internal use only.

  */
  public org.apache.myfaces.tobago.layout.Measure getPaddingLeft() {
    if (paddingLeft != null) {
      return paddingLeft;
    }
    ValueExpression ve = getValueExpression("paddingLeft");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
  getRenderer(getFacesContext())).getPaddingLeft(getFacesContext(), this);
  }

  public void setPaddingLeft(org.apache.myfaces.tobago.layout.Measure paddingLeft) {
    this.paddingLeft = paddingLeft;
  }

  /**
  This attribute is for internal use only.

  */
  public org.apache.myfaces.tobago.layout.Measure getPaddingRight() {
    if (paddingRight != null) {
      return paddingRight;
    }
    ValueExpression ve = getValueExpression("paddingRight");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
  getRenderer(getFacesContext())).getPaddingRight(getFacesContext(), this);
  }

  public void setPaddingRight(org.apache.myfaces.tobago.layout.Measure paddingRight) {
    this.paddingRight = paddingRight;
  }

  public org.apache.myfaces.tobago.layout.Measure getPreferredWidth() {
    if (preferredWidth != null) {
      return preferredWidth;
    }
    ValueExpression ve = getValueExpression("preferredWidth");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this);
  }

  public void setPreferredWidth(org.apache.myfaces.tobago.layout.Measure preferredWidth) {
    this.preferredWidth = preferredWidth;
  }

  /**
  Indicating how tab switching should be done.
   <p/>
   Possible values are:
   <dl>
     <dt>client</dt>
     <dd>Tab switching is done on client, no server Request.</dd>
     <dt>reloadPage</dt>
     <dd>Tab switching is done by server request. Full page is reloaded.</dd>
     <dt>reloadTab</dt>
     <dd>Tab switching is done by server request. Only the Tab is reloaded.</dd>
   </dl>
  <br />Default: <code>client</code><br />Allowed Values: <code>client,reloadPage,reloadTab</code>
  */
  public java.lang.String getSwitchType() {
    if (switchType != null) {
      return switchType;
    }
    ValueExpression ve = getValueExpression("switchType");
    if (ve != null) {
      try {
        java.lang.String switchType = (java.lang.String) ve.getValue(getFacesContext().getELContext());
        if (switchType != null) {
          return switchType;
        }
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return "client";
  }

  public void setSwitchType(java.lang.String switchType) {
    this.switchType = switchType;
  }

  public org.apache.myfaces.tobago.layout.Measure getMarginBottom() {
    if (marginBottom != null) {
      return marginBottom;
    }
    ValueExpression ve = getValueExpression("marginBottom");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((LayoutComponentRenderer) getRenderer(getFacesContext())).getMarginBottom(getFacesContext(), this);
  }

  public void setMarginBottom(org.apache.myfaces.tobago.layout.Measure marginBottom) {
    this.marginBottom = marginBottom;
  }

  /**
  Flag indicating that, if this component is activated by the user,
   notifications should be delivered to interested listeners and actions
   immediately (that is, during Apply Request Values phase) rather than
   waiting until Invoke Application phase.
  <br />Default: <code>false</code>
  */
  public boolean isImmediate() {
    if (immediate != null) {
      return immediate;
    }
    ValueExpression ve = getValueExpression("immediate");
    if (ve != null) {
      try {
        Boolean bool = (Boolean) ve.getValue(getFacesContext().getELContext());
        if (bool != null) {
          return bool;
        }
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return false;
  }

  public void setImmediate(boolean immediate) {
    this.immediate = immediate;
  }

  /**
  This attribute is for internal use only.

  */
  public org.apache.myfaces.tobago.layout.Measure getBorderTop() {
    if (borderTop != null) {
      return borderTop;
    }
    ValueExpression ve = getValueExpression("borderTop");
    if (ve != null) {
      try {
        Object object = ve.getValue(getFacesContext().getELContext());
        return Measure.valueOf(object);
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)
  getRenderer(getFacesContext())).getBorderTop(getFacesContext(), this);
  }

  public void setBorderTop(org.apache.myfaces.tobago.layout.Measure borderTop) {
    this.borderTop = borderTop;
  }

  /**
  This attribute is for internal use only.

  */
  public java.lang.Integer getVerticalIndex() {
    if (verticalIndex != null) {
      return verticalIndex;
    }
    ValueExpression ve = getValueExpression("verticalIndex");
    if (ve != null) {
      try {
        Number number = (Number) ve.getValue(getFacesContext().getELContext());
        if (number != null) {
          return number.intValue();
        }
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return null;
  }

  public void setVerticalIndex(java.lang.Integer verticalIndex) {
    this.verticalIndex = verticalIndex;
  }

  /**
  Indicate the partially rendered Components in a case of a submit.

  */
  public String[] getRenderedPartially() {
    if (renderedPartially != null) {
      return renderedPartially;
    }
    ValueExpression ve = getValueExpression("renderedPartially");
    if (ve != null) {
      try {
        Object strArray = ve.getValue(getFacesContext().getELContext());
        if (strArray instanceof String[]) {
          return (String[]) strArray;
        } else if (strArray instanceof String) {
          String[] strings = StringUtils.split((String) strArray, ", ");
          List<String> result = new ArrayList<String>(strings.length);
          for (String string : strings) {
            if (string.trim().length() != 0) {
              result.add(string.trim());
            }
          }
          return result.toArray(new String[result.size()]);
        } else if (strArray == null) {
          return ArrayUtils.EMPTY_STRING_ARRAY;
        } else {
          return new String[]{strArray.toString()};
        }
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return ArrayUtils.EMPTY_STRING_ARRAY;
  }

  public void setRenderedPartially(String[] renderedPartially) {
    this.renderedPartially = renderedPartially;
  }

  public org.apache.myfaces.tobago.context.Markup getCurrentMarkup() {
    if (currentMarkup != null) {
      return currentMarkup;
    }
    return null;
  }

  public void setCurrentMarkup(org.apache.myfaces.tobago.context.Markup currentMarkup) {
    this.currentMarkup = currentMarkup;
  }

  /**
  This attribute is for internal use only.

  */
  public java.lang.Integer getHorizontalIndex() {
    if (horizontalIndex != null) {
      return horizontalIndex;
    }
    ValueExpression ve = getValueExpression("horizontalIndex");
    if (ve != null) {
      try {
        Number number = (Number) ve.getValue(getFacesContext().getELContext());
        if (number != null) {
          return number.intValue();
        }
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return null;
  }

  public void setHorizontalIndex(java.lang.Integer horizontalIndex) {
    this.horizontalIndex = horizontalIndex;
  }

  public void restoreState(FacesContext context, Object componentState) {
    Object[] values = (Object[]) componentState;
    super.restoreState(context, values[0]);
    actionListener = (javax.faces.el.MethodBinding) restoreAttachedState(context, values[1]);
    markup = (org.apache.myfaces.tobago.context.Markup) values[2];
    renderedIndex = (java.lang.Integer) values[3];
    marginLeft = (org.apache.myfaces.tobago.layout.Measure) values[4];
    minimumHeight = (org.apache.myfaces.tobago.layout.Measure) values[5];
    borderLeft = (org.apache.myfaces.tobago.layout.Measure) values[6];
    height = (org.apache.myfaces.tobago.layout.Measure) values[7];
    minimumWidth = (org.apache.myfaces.tobago.layout.Measure) values[8];
    overflowX = (java.lang.Boolean) values[9];

    actionExpression = (javax.el.MethodExpression) restoreAttachedState(context, values[10]);
    rowSpan = (java.lang.Integer) values[11];
    overflowY = (java.lang.Boolean) values[12];
    left = (org.apache.myfaces.tobago.layout.Measure) values[13];
    columnSpan = (java.lang.Integer) values[14];
    borderRight = (org.apache.myfaces.tobago.layout.Measure) values[15];
    showNavigationBar = (java.lang.Boolean) values[16];
    paddingBottom = (org.apache.myfaces.tobago.layout.Measure) values[17];
    tabChangeListener = (javax.faces.el.MethodBinding) restoreAttachedState(context, values[18]);
    maximumHeight = (org.apache.myfaces.tobago.layout.Measure) values[19];
    top = (org.apache.myfaces.tobago.layout.Measure) values[20];
    currentWidth = (org.apache.myfaces.tobago.layout.Measure) values[21];
    selectedIndex = (java.lang.Integer) values[22];
    paddingTop = (org.apache.myfaces.tobago.layout.Measure) values[23];
    marginTop = (org.apache.myfaces.tobago.layout.Measure) values[24];
    width = (org.apache.myfaces.tobago.layout.Measure) values[25];
    marginRight = (org.apache.myfaces.tobago.layout.Measure) values[26];
    currentHeight = (org.apache.myfaces.tobago.layout.Measure) values[27];
    preferredHeight = (org.apache.myfaces.tobago.layout.Measure) values[28];
    borderBottom = (org.apache.myfaces.tobago.layout.Measure) values[29];
    display = (org.apache.myfaces.tobago.layout.Display) values[30];
    maximumWidth = (org.apache.myfaces.tobago.layout.Measure) values[31];
    paddingLeft = (org.apache.myfaces.tobago.layout.Measure) values[32];
    paddingRight = (org.apache.myfaces.tobago.layout.Measure) values[33];
    preferredWidth = (org.apache.myfaces.tobago.layout.Measure) values[34];
    switchType = (java.lang.String) values[35];
    marginBottom = (org.apache.myfaces.tobago.layout.Measure) values[36];
    immediate = (java.lang.Boolean) values[37];
    borderTop = (org.apache.myfaces.tobago.layout.Measure) values[38];
    verticalIndex = (java.lang.Integer) values[39];
    renderedPartially = (java.lang.String[]) values[40];
    horizontalIndex = (java.lang.Integer) values[41];
  }

  public Object saveState(FacesContext context) {
    Object[] values = new Object[42];
    values[0] = super.saveState(context);
    values[1] = saveAttachedState(context, actionListener);
    values[2] = markup;
    values[3] = renderedIndex;
    values[4] = marginLeft;
    values[5] = minimumHeight;
    values[6] = borderLeft;
    values[7] = height;
    values[8] = minimumWidth;
    values[9] = overflowX;

    values[10] = saveAttachedState(context, actionExpression);
    values[11] = rowSpan;
    values[12] = overflowY;
    values[13] = left;
    values[14] = columnSpan;
    values[15] = borderRight;
    values[16] = showNavigationBar;
    values[17] = paddingBottom;
    values[18] = saveAttachedState(context, tabChangeListener);
    values[19] = maximumHeight;
    values[20] = top;
    values[21] = currentWidth;
    values[22] = selectedIndex;
    values[23] = paddingTop;
    values[24] = marginTop;
    values[25] = width;
    values[26] = marginRight;
    values[27] = currentHeight;
    values[28] = preferredHeight;
    values[29] = borderBottom;
    values[30] = display;
    values[31] = maximumWidth;
    values[32] = paddingLeft;
    values[33] = paddingRight;
    values[34] = preferredWidth;
    values[35] = switchType;
    values[36] = marginBottom;
    values[37] = immediate;
    values[38] = borderTop;
    values[39] = verticalIndex;
    values[40] = renderedPartially;
    values[41] = horizontalIndex;
    currentMarkup = null;
    return values;
  }


}
TOP

Related Classes of org.apache.myfaces.tobago.component.UITabGroup

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.