Package org.apache.myfaces.tobago.component

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

// ---------- 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.context.FacesContext;
import javax.faces.el.MethodBinding;
import org.apache.myfaces.tobago.context.Markup;
import org.apache.myfaces.tobago.event.SortActionSource;
import org.apache.myfaces.tobago.event.SortActionSource2;
import org.apache.myfaces.tobago.internal.component.AbstractUISheet;
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;

/**
Render a sheet element.
  * UIComponent class, generated from template {@code component1.2.stg} with class
  * {@link org.apache.myfaces.tobago.internal.taglib.component.SheetTagDeclaration}.
*/
public class UISheet
    extends AbstractUISheet implements SortActionSource, SortActionSource2, SupportsMarkup {

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

  private org.apache.myfaces.tobago.context.Markup markup;
  private org.apache.myfaces.tobago.layout.Measure marginLeft;
  private java.lang.String columns;
  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.String showDirectLinks;
  private java.lang.String showPageRange;
  private java.lang.Boolean overflowX;
  private java.lang.Boolean overflowY;
  private java.lang.String forceVerticalScrollbar;
  private javax.faces.el.MethodBinding stateChangeListener;
  private org.apache.myfaces.tobago.layout.Measure borderRight;
  private org.apache.myfaces.tobago.layout.Measure maximumHeight;
  private org.apache.myfaces.tobago.layout.Measure currentWidth;
  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 currentHeight;
  private org.apache.myfaces.tobago.layout.Measure borderBottom;
  private org.apache.myfaces.tobago.layout.Display display;
  private org.apache.myfaces.tobago.layout.Measure paddingLeft;
  private org.apache.myfaces.tobago.layout.Measure preferredWidth;
  private org.apache.myfaces.tobago.layout.Measure borderTop;
  private java.lang.Integer verticalIndex;
  private java.lang.Boolean showPagingAlways;
  private org.apache.myfaces.tobago.context.Markup currentMarkup;
  private java.lang.String[] renderedPartially;
  private org.apache.myfaces.tobago.layout.Measure minimumHeight;
  private java.lang.Integer rowSpan;
  private org.apache.myfaces.tobago.layout.Measure left;
  private java.lang.Integer columnSpan;
  private org.apache.myfaces.tobago.layout.Measure paddingBottom;
  private org.apache.myfaces.tobago.layout.Measure top;
  private java.lang.String showRowRange;
  private org.apache.myfaces.tobago.layout.Measure marginRight;
  private org.apache.myfaces.tobago.layout.Measure preferredHeight;
  private org.apache.myfaces.tobago.layout.Measure maximumWidth;
  private org.apache.myfaces.tobago.layout.Measure paddingRight;
  private org.apache.myfaces.tobago.layout.Measure marginBottom;
  private java.lang.String selectable;
  private java.lang.Boolean showHeader;
  private java.lang.Integer directLinkCount;

  private javax.el.MethodExpression sortActionListenerExpression;
  private java.lang.Integer horizontalIndex;


  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;
  }

  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;
  }

  /**
  LayoutConstraints for column layout.
   Semicolon separated list of layout tokens ('<x>*', '<x>px' or '<x>%').

  */
  public java.lang.String getColumns() {
    if (columns != null) {
      return columns;
    }
    ValueExpression ve = getValueExpression("columns");
    if (ve != null) {
      try {
        return (java.lang.String) ve.getValue(getFacesContext().getELContext());
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return null;
  }

  public void setColumns(java.lang.String columns) {
    this.columns = columns;
  }

  /**
  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;
  }

  /**
  Flag indicating whether or not a range of direct paging links should be
   rendered in the sheet's footer.
  <br />Default: <code>center</code><br />Allowed Values: <code>left,center,right,none</code>
  */
  public java.lang.String getShowDirectLinks() {
    if (showDirectLinks != null) {
      return showDirectLinks;
    }
    ValueExpression ve = getValueExpression("showDirectLinks");
    if (ve != null) {
      try {
        java.lang.String showDirectLinks = (java.lang.String) ve.getValue(getFacesContext().getELContext());
        if (showDirectLinks != null) {
          return showDirectLinks;
        }
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return "center";
  }

  public void setShowDirectLinks(java.lang.String showDirectLinks) {
    this.showDirectLinks = showDirectLinks;
  }

  /**
  Flag indicating whether and where the range pages should
   rendered in the sheet's footer. Rendering this range also offers the
   capability to enter the index displayed page directly.
  <br />Default: <code>right</code><br />Allowed Values: <code>left,center,right,none</code>
  */
  public java.lang.String getShowPageRange() {
    if (showPageRange != null) {
      return showPageRange;
    }
    ValueExpression ve = getValueExpression("showPageRange");
    if (ve != null) {
      try {
        java.lang.String showPageRange = (java.lang.String) ve.getValue(getFacesContext().getELContext());
        if (showPageRange != null) {
          return showPageRange;
        }
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return "right";
  }

  public void setShowPageRange(java.lang.String showPageRange) {
    this.showPageRange = showPageRange;
  }

  /**
  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;
  }

  /**
  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;
  }

  /**
  Flag indicating whether or not this sheet should reserve space for
   vertical toolbar when calculating column width's.<br />
   Possible values are: <pre>
        'auto'  : sheet try to estimate the need of scrollbar.
        'true'  : space for scrollbar is reserved.
        'false' : no space is reserved.
        </pre>
  <br />Default: <code>auto</code><br />Allowed Values: <code>auto,true,false</code>
  */
  public java.lang.String getForceVerticalScrollbar() {
    if (forceVerticalScrollbar != null) {
      return forceVerticalScrollbar;
    }
    ValueExpression ve = getValueExpression("forceVerticalScrollbar");
    if (ve != null) {
      try {
        java.lang.String forceVerticalScrollbar = (java.lang.String) ve.getValue(getFacesContext().getELContext());
        if (forceVerticalScrollbar != null) {
          return forceVerticalScrollbar;
        }
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return "auto";
  }

  public void setForceVerticalScrollbar(java.lang.String forceVerticalScrollbar) {
    this.forceVerticalScrollbar = forceVerticalScrollbar;
  }

  public javax.faces.el.MethodBinding getStateChangeListener() {
    return stateChangeListener;
  }

  public void setStateChangeListener(javax.faces.el.MethodBinding stateChangeListener) {
    this.stateChangeListener = stateChangeListener;
  }

  /**
  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;
  }

  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. 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;
  }

  /**
  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;
  }

  /**
  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;
  }

  /**
  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;
  }

  /**
  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;
  }

  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;
  }

  /**
  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;
  }

  /**
  Flag indicating whether or not the paging panel should be display, if it is not needed for paging.<br />
   <ul>
   <li>showPagingAlways="false" which is the default means, that the paging footer should be displayed,
   only when it is needed.</li>
   <ul>
   <li>When the rows="0" paging is not needed, so the footer will not be rendered,</li>
   <li>when rows="N", N &gt; 0 and the size of the data value is &lt;= N paging is not needed
   and the footer will not be rendered,</li>
   <li>in any other case the paging footer will be displayed.</li>
   </ul>
   <li>showPagingAlways="true" means, that the paging footer should be displayed in any case.</li>
   </ul>
  <br />Default: <code>false</code>
  */
  public boolean isShowPagingAlways() {
    if (showPagingAlways != null) {
      return showPagingAlways;
    }
    ValueExpression ve = getValueExpression("showPagingAlways");
    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 setShowPagingAlways(boolean showPagingAlways) {
    this.showPagingAlways = showPagingAlways;
  }

  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;
  }

  /**
  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.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;
  }

  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 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 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;
  }

  /**
  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;
  }

  /**
  Flag indicating whether or not the range of displayed rows should
   rendered in the sheet's footer. Rendering this range also offers the
   capability to enter the index of the start row directly.
  <br />Default: <code>left</code><br />Allowed Values: <code>left,center,right,none</code>
  */
  public java.lang.String getShowRowRange() {
    if (showRowRange != null) {
      return showRowRange;
    }
    ValueExpression ve = getValueExpression("showRowRange");
    if (ve != null) {
      try {
        java.lang.String showRowRange = (java.lang.String) ve.getValue(getFacesContext().getELContext());
        if (showRowRange != null) {
          return showRowRange;
        }
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return "left";
  }

  public void setShowRowRange(java.lang.String showRowRange) {
    this.showRowRange = showRowRange;
  }

  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;
  }

  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;
  }

  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 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 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 whether or not the sheet should be selectable.
  <br />Default: <code>multi</code><br />Allowed Values: <code>none,single,singleOrNone,multi</code>
  */
  public java.lang.String getSelectable() {
    if (selectable != null) {
      return selectable;
    }
    ValueExpression ve = getValueExpression("selectable");
    if (ve != null) {
      try {
        java.lang.String selectable = (java.lang.String) ve.getValue(getFacesContext().getELContext());
        if (selectable != null) {
          return selectable;
        }
      } catch (ELException e) {
        throw new FacesException(e);
      }
    }
    return "multi";
  }

  public void setSelectable(java.lang.String selectable) {
    this.selectable = selectable;
  }

  /**
  Flag indicating the header should be rendered.
  <br />Default: <code>true</code>
  */
  public boolean isShowHeader() {
    if (showHeader != null) {
      return showHeader;
    }
    ValueExpression ve = getValueExpression("showHeader");
    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 setShowHeader(boolean showHeader) {
    this.showHeader = showHeader;
  }

  /**
  The count of rendered direct paging links in the sheet's footer.<br />
  <br />Default: <code>9</code>
  */
  public java.lang.Integer getDirectLinkCount() {
    if (directLinkCount != null) {
      return directLinkCount;
    }
    ValueExpression ve = getValueExpression("directLinkCount");
    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 9;
  }

  public void setDirectLinkCount(java.lang.Integer directLinkCount) {
    this.directLinkCount = directLinkCount;
  }

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

  public void setSortActionListener(javax.faces.el.MethodBinding sortActionListener) {
    if (sortActionListener != null) {
      setSortActionListenerExpression(new MethodBindingToMethodExpression(sortActionListener));
    } else {
      setSortActionListenerExpression(null);
    }
  }

  public javax.el.MethodExpression getSortActionListenerExpression() {
    return sortActionListenerExpression;
  }

  public void setSortActionListenerExpression(javax.el.MethodExpression sortActionListenerExpression) {
    this.sortActionListenerExpression = sortActionListenerExpression;
  }

  /**
  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]);
    markup = (org.apache.myfaces.tobago.context.Markup) values[1];
    marginLeft = (org.apache.myfaces.tobago.layout.Measure) values[2];
    columns = (java.lang.String) values[3];
    borderLeft = (org.apache.myfaces.tobago.layout.Measure) values[4];
    height = (org.apache.myfaces.tobago.layout.Measure) values[5];
    minimumWidth = (org.apache.myfaces.tobago.layout.Measure) values[6];
    showDirectLinks = (java.lang.String) values[7];
    showPageRange = (java.lang.String) values[8];
    overflowX = (java.lang.Boolean) values[9];
    overflowY = (java.lang.Boolean) values[10];
    forceVerticalScrollbar = (java.lang.String) values[11];
    stateChangeListener = (javax.faces.el.MethodBinding) restoreAttachedState(context, values[12]);
    borderRight = (org.apache.myfaces.tobago.layout.Measure) values[13];
    maximumHeight = (org.apache.myfaces.tobago.layout.Measure) values[14];
    currentWidth = (org.apache.myfaces.tobago.layout.Measure) values[15];
    paddingTop = (org.apache.myfaces.tobago.layout.Measure) values[16];
    marginTop = (org.apache.myfaces.tobago.layout.Measure) values[17];
    width = (org.apache.myfaces.tobago.layout.Measure) values[18];
    currentHeight = (org.apache.myfaces.tobago.layout.Measure) values[19];
    borderBottom = (org.apache.myfaces.tobago.layout.Measure) values[20];
    display = (org.apache.myfaces.tobago.layout.Display) values[21];
    paddingLeft = (org.apache.myfaces.tobago.layout.Measure) values[22];
    preferredWidth = (org.apache.myfaces.tobago.layout.Measure) values[23];
    borderTop = (org.apache.myfaces.tobago.layout.Measure) values[24];
    verticalIndex = (java.lang.Integer) values[25];
    showPagingAlways = (java.lang.Boolean) values[26];
    renderedPartially = (java.lang.String[]) values[27];
    minimumHeight = (org.apache.myfaces.tobago.layout.Measure) values[28];
    rowSpan = (java.lang.Integer) values[29];
    left = (org.apache.myfaces.tobago.layout.Measure) values[30];
    columnSpan = (java.lang.Integer) values[31];
    paddingBottom = (org.apache.myfaces.tobago.layout.Measure) values[32];
    top = (org.apache.myfaces.tobago.layout.Measure) values[33];
    showRowRange = (java.lang.String) values[34];
    marginRight = (org.apache.myfaces.tobago.layout.Measure) values[35];
    preferredHeight = (org.apache.myfaces.tobago.layout.Measure) values[36];
    maximumWidth = (org.apache.myfaces.tobago.layout.Measure) values[37];
    paddingRight = (org.apache.myfaces.tobago.layout.Measure) values[38];
    marginBottom = (org.apache.myfaces.tobago.layout.Measure) values[39];
    selectable = (java.lang.String) values[40];
    showHeader = (java.lang.Boolean) values[41];
    directLinkCount = (java.lang.Integer) values[42];

    sortActionListenerExpression = (javax.el.MethodExpression) restoreAttachedState(context, values[43]);
    horizontalIndex = (java.lang.Integer) values[44];
  }

  public Object saveState(FacesContext context) {
    Object[] values = new Object[45];
    values[0] = super.saveState(context);
    values[1] = markup;
    values[2] = marginLeft;
    values[3] = columns;
    values[4] = borderLeft;
    values[5] = height;
    values[6] = minimumWidth;
    values[7] = showDirectLinks;
    values[8] = showPageRange;
    values[9] = overflowX;
    values[10] = overflowY;
    values[11] = forceVerticalScrollbar;
    values[12] = saveAttachedState(context, stateChangeListener);
    values[13] = borderRight;
    values[14] = maximumHeight;
    values[15] = currentWidth;
    values[16] = paddingTop;
    values[17] = marginTop;
    values[18] = width;
    values[19] = currentHeight;
    values[20] = borderBottom;
    values[21] = display;
    values[22] = paddingLeft;
    values[23] = preferredWidth;
    values[24] = borderTop;
    values[25] = verticalIndex;
    values[26] = showPagingAlways;
    values[27] = renderedPartially;
    values[28] = minimumHeight;
    values[29] = rowSpan;
    values[30] = left;
    values[31] = columnSpan;
    values[32] = paddingBottom;
    values[33] = top;
    values[34] = showRowRange;
    values[35] = marginRight;
    values[36] = preferredHeight;
    values[37] = maximumWidth;
    values[38] = paddingRight;
    values[39] = marginBottom;
    values[40] = selectable;
    values[41] = showHeader;
    values[42] = directLinkCount;

    values[43] = saveAttachedState(context, sortActionListenerExpression);
    values[44] = horizontalIndex;
    currentMarkup = null;
    return values;
  }


}
TOP

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

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.