001: // WARNING: This file was automatically generated. Do not edit it directly,
002: // or you will lose your changes.
003:
004: /*
005: * Licensed to the Apache Software Foundation (ASF) under one
006: * or more contributor license agreements. See the NOTICE file
007: * distributed with this work for additional information
008: * regarding copyright ownership. The ASF licenses this file
009: * to you under the Apache License, Version 2.0 (the
010: * "License"); you may not use this file except in compliance
011: * with the License. You may obtain a copy of the License at
012: *
013: * http://www.apache.org/licenses/LICENSE-2.0
014: *
015: * Unless required by applicable law or agreed to in writing,
016: * software distributed under the License is distributed on an
017: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
018: * KIND, either express or implied. See the License for the
019: * specific language governing permissions and limitations
020: * under the License.
021: */
022: package javax.faces.component.html;
023:
024: import javax.el.ValueExpression;
025: import javax.faces.component.UIPanel;
026: import javax.faces.context.FacesContext;
027:
028: /**
029: */
030: public class HtmlPanelGroup extends UIPanel {
031:
032: static public final String COMPONENT_FAMILY = "javax.faces.Panel";
033: static public final String COMPONENT_TYPE = "javax.faces.HtmlPanelGroup";
034:
035: /**
036: * Construct an instance of the HtmlPanelGroup.
037: */
038: public HtmlPanelGroup() {
039: setRendererType("javax.faces.Group");
040: }
041:
042: // Property: style
043: private String _style;
044:
045: /**
046: * Gets CSS styling instructions.
047: *
048: * @return the new style value
049: */
050: public String getStyle() {
051: if (_style != null) {
052: return _style;
053: }
054: ValueExpression expression = getValueExpression("style");
055: if (expression != null) {
056: return (String) expression.getValue(getFacesContext()
057: .getELContext());
058: }
059: return null;
060: }
061:
062: /**
063: * Sets CSS styling instructions.
064: *
065: * @param style the new style value
066: */
067: public void setStyle(String style) {
068: this ._style = style;
069: }
070:
071: // Property: styleClass
072: private String _styleClass;
073:
074: /**
075: * Gets The CSS class for this element. Corresponds to the HTML 'class' attribute.
076: *
077: * @return the new styleClass value
078: */
079: public String getStyleClass() {
080: if (_styleClass != null) {
081: return _styleClass;
082: }
083: ValueExpression expression = getValueExpression("styleClass");
084: if (expression != null) {
085: return (String) expression.getValue(getFacesContext()
086: .getELContext());
087: }
088: return null;
089: }
090:
091: /**
092: * Sets The CSS class for this element. Corresponds to the HTML 'class' attribute.
093: *
094: * @param styleClass the new styleClass value
095: */
096: public void setStyleClass(String styleClass) {
097: this ._styleClass = styleClass;
098: }
099:
100: // Property: layout
101: private String _layout;
102:
103: /**
104: * Gets The type of layout markup to use when rendering this group. If the value is "block"
105: * the renderer must produce an HTML "div" element. Otherwise HTML "span" element must be produced.
106: *
107: * @return the new layout value
108: */
109: public String getLayout() {
110: if (_layout != null) {
111: return _layout;
112: }
113: ValueExpression expression = getValueExpression("layout");
114: if (expression != null) {
115: return (String) expression.getValue(getFacesContext()
116: .getELContext());
117: }
118: return null;
119: }
120:
121: /**
122: * Sets The type of layout markup to use when rendering this group. If the value is "block"
123: * the renderer must produce an HTML "div" element. Otherwise HTML "span" element must be produced.
124: *
125: * @param layout the new layout value
126: */
127: public void setLayout(String layout) {
128: this ._layout = layout;
129: }
130:
131: @Override
132: public Object saveState(FacesContext facesContext) {
133: Object[] values = new Object[4];
134: values[0] = super .saveState(facesContext);
135: values[1] = _style;
136: values[2] = _styleClass;
137: values[3] = _layout;
138:
139: return values;
140: }
141:
142: @Override
143: public void restoreState(FacesContext facesContext, Object state) {
144: Object[] values = (Object[]) state;
145: super .restoreState(facesContext, values[0]);
146: _style = (String) values[1];
147: _styleClass = (String) values[2];
148: _layout = (String) values[3];
149: }
150:
151: @Override
152: public String getFamily() {
153: return COMPONENT_FAMILY;
154: }
155: }
|