001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.cocoon.faces.taglib.html;
018:
019: import org.apache.cocoon.faces.taglib.UIComponentTag;
020:
021: import javax.faces.FacesException;
022: import javax.faces.component.UIComponent;
023: import javax.faces.component.UIPanel;
024:
025: /**
026: * @version CVS $Id: PanelGridTag.java 433543 2006-08-22 06:22:54Z crossley $
027: */
028: public class PanelGridTag extends UIComponentTag {
029:
030: private String bgcolor;
031: private String border;
032: private String cellpadding;
033: private String cellspacing;
034: private String columnClasses;
035: private String columns;
036: private String dir;
037: private String footerClass;
038: private String frame;
039: private String headerClass;
040: private String lang;
041: private String onclick;
042: private String ondblclick;
043: private String onkeydown;
044: private String onkeypress;
045: private String onkeyup;
046: private String onmousedown;
047: private String onmousemove;
048: private String onmouseout;
049: private String onmouseover;
050: private String onmouseup;
051: private String rowClasses;
052: private String rules;
053: private String style;
054: private String styleClass;
055: private String summary;
056: private String title;
057: private String width;
058:
059: public void setBgcolor(String bgcolor) {
060: this .bgcolor = bgcolor;
061: }
062:
063: public void setBorder(String border) {
064: this .border = border;
065: }
066:
067: public void setCellpadding(String cellpadding) {
068: this .cellpadding = cellpadding;
069: }
070:
071: public void setCellspacing(String cellspacing) {
072: this .cellspacing = cellspacing;
073: }
074:
075: public void setColumnClasses(String columnClasses) {
076: this .columnClasses = columnClasses;
077: }
078:
079: public void setColumns(String columns) {
080: this .columns = columns;
081: }
082:
083: public void setDir(String dir) {
084: this .dir = dir;
085: }
086:
087: public void setFooterClass(String footerClass) {
088: this .footerClass = footerClass;
089: }
090:
091: public void setFrame(String frame) {
092: this .frame = frame;
093: }
094:
095: public void setHeaderClass(String headerClass) {
096: this .headerClass = headerClass;
097: }
098:
099: public void setLang(String lang) {
100: this .lang = lang;
101: }
102:
103: public void setOnclick(String onclick) {
104: this .onclick = onclick;
105: }
106:
107: public void setOndblclick(String ondblclick) {
108: this .ondblclick = ondblclick;
109: }
110:
111: public void setOnkeydown(String onkeydown) {
112: this .onkeydown = onkeydown;
113: }
114:
115: public void setOnkeypress(String onkeypress) {
116: this .onkeypress = onkeypress;
117: }
118:
119: public void setOnkeyup(String onkeyup) {
120: this .onkeyup = onkeyup;
121: }
122:
123: public void setOnmousedown(String onmousedown) {
124: this .onmousedown = onmousedown;
125: }
126:
127: public void setOnmousemove(String onmousemove) {
128: this .onmousemove = onmousemove;
129: }
130:
131: public void setOnmouseout(String onmouseout) {
132: this .onmouseout = onmouseout;
133: }
134:
135: public void setOnmouseover(String onmouseover) {
136: this .onmouseover = onmouseover;
137: }
138:
139: public void setOnmouseup(String onmouseup) {
140: this .onmouseup = onmouseup;
141: }
142:
143: public void setRowClasses(String rowClasses) {
144: this .rowClasses = rowClasses;
145: }
146:
147: public void setRules(String rules) {
148: this .rules = rules;
149: }
150:
151: public void setStyle(String style) {
152: this .style = style;
153: }
154:
155: public void setStyleClass(String styleClass) {
156: this .styleClass = styleClass;
157: }
158:
159: public void setSummary(String summary) {
160: this .summary = summary;
161: }
162:
163: public void setTitle(String title) {
164: this .title = title;
165: }
166:
167: public void setWidth(String width) {
168: this .width = width;
169: }
170:
171: public String getRendererType() {
172: return "javax.faces.Grid";
173: }
174:
175: public String getComponentType() {
176: return "javax.faces.HtmlPanelGrid";
177: }
178:
179: protected void setProperties(UIComponent component) {
180: super .setProperties(component);
181:
182: if (!(component instanceof UIPanel)) {
183: throw new FacesException("Tag <" + getClass().getName()
184: + "> expected UIPanel. " + "Got <"
185: + component.getClass().getName() + ">");
186: }
187:
188: setProperty(component, "bgcolor", bgcolor);
189:
190: setIntegerProperty(component, "border", border);
191:
192: setProperty(component, "cellpadding", cellpadding);
193: setProperty(component, "cellspacing", cellspacing);
194: setProperty(component, "columnClasses", columnClasses);
195:
196: setIntegerProperty(component, "columns", columns);
197:
198: setProperty(component, "dir", dir);
199: setProperty(component, "footerClass", footerClass);
200: setProperty(component, "frame", frame);
201: setProperty(component, "headerClass", headerClass);
202: setProperty(component, "lang", lang);
203:
204: setProperty(component, "onclick", onclick);
205: setProperty(component, "ondblclick", ondblclick);
206: setProperty(component, "onkeydown", onkeydown);
207: setProperty(component, "onkeypress", onkeypress);
208: setProperty(component, "onkeyup", onkeyup);
209: setProperty(component, "onmousedown", onmousedown);
210: setProperty(component, "onmousemove", onmousemove);
211: setProperty(component, "onmouseout", onmouseout);
212: setProperty(component, "onmouseover", onmouseover);
213: setProperty(component, "onmouseup", onmouseup);
214:
215: setProperty(component, "rowClasses", rowClasses);
216: setProperty(component, "rules", rules);
217: setProperty(component, "style", style);
218: setProperty(component, "styleClass", styleClass);
219: setProperty(component, "summary", summary);
220: setProperty(component, "title", title);
221: setProperty(component, "width", width);
222: }
223:
224: public void recycle() {
225: super.recycle();
226: bgcolor = null;
227: border = null;
228: cellpadding = null;
229: cellspacing = null;
230: columnClasses = null;
231: columns = null;
232: dir = null;
233: footerClass = null;
234: frame = null;
235: headerClass = null;
236: lang = null;
237: onclick = null;
238: ondblclick = null;
239: onkeydown = null;
240: onkeypress = null;
241: onkeyup = null;
242: onmousedown = null;
243: onmousemove = null;
244: onmouseout = null;
245: onmouseover = null;
246: onmouseup = null;
247: rowClasses = null;
248: rules = null;
249: style = null;
250: styleClass = null;
251: summary = null;
252: title = null;
253: width = null;
254: }
255: }
|