001: /*
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 1999 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * Initial developer(s): Michel-Ange ANTON
022: * --------------------------------------------------------------------------
023: * $Id: GridTableBaseTag.java 4501 2004-03-26 16:16:12Z benoitf $
024: * --------------------------------------------------------------------------
025: */
026:
027: package org.objectweb.jonas.webapp.taglib;
028:
029: import javax.servlet.jsp.JspException;
030:
031: public class GridTableBaseTag extends GridBaseTag {
032:
033: // ----------------------------------------------------- Properties
034:
035: private String align = null;
036: private String valign = null;
037: private String width = null;
038: private String height = null;
039:
040: /**
041: * Return the Alignment
042: */
043: public String getAlign() {
044: return (this .align);
045: }
046:
047: /**
048: * Set the Alignment
049: *
050: * @param Value for Alignment
051: */
052: public void setAlign(String align) {
053: this .align = align;
054: }
055:
056: /**
057: * Return the Vertical Alignment
058: */
059: public String getValign() {
060: return (this .valign);
061: }
062:
063: /**
064: * Set the Vertical Alignment
065: *
066: * @param Value for Vertical Alignment
067: */
068:
069: public void setValign(String valign) {
070: this .valign = valign;
071: }
072:
073: public String getWidth() {
074: return width;
075: }
076:
077: public void setWidth(String width) {
078: this .width = width;
079: }
080:
081: public String getHeight() {
082: return height;
083: }
084:
085: public void setHeight(String height) {
086: this .height = height;
087: }
088:
089: // ----------------------------------------------------- Protected Methods
090:
091: /**
092: * Return the HTML element.
093: */
094: protected String getHtmlElement() {
095: return "table";
096: }
097:
098: /**
099: * Prepare the attributes of the HTML element
100: */
101: protected String prepareAttributes() throws JspException {
102: StringBuffer sb = new StringBuffer();
103:
104: // Append "width" parameter
105: sb.append(prepareAttribute("width", width));
106: // Append "height" parameter
107: sb.append(prepareAttribute("height", height));
108: // Append "align" parameter
109: sb.append(prepareAttribute("align", align));
110: // Append "valign" parameter
111: sb.append(prepareAttribute("valign", valign));
112:
113: // Append Event Handler details
114: sb.append(super .prepareAttributes());
115:
116: return sb.toString();
117:
118: }
119:
120: // ----------------------------------------------------- Public Methods
121:
122: /**
123: * Release resources after Tag processing has finished.
124: */
125: public void release() {
126: super.release();
127: align = null;
128: valign = null;
129: width = null;
130: height = null;
131: }
132: }
|