JonasGridRowTitleTag.java

00001 /*
00002  * JOnAS: Java(TM) Open Application Server
00003  * Copyright (C) 1999 Bull S.A.
00004  * Contact: jonas-team@objectweb.org
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
00019  * USA
00020  *
00021  * Initial developer(s): Michel-Ange ANTON
00022  * --------------------------------------------------------------------------
00023  * $Id: JonasGridRowTitleTag.java,v 1.3 2003/06/20 17:15:42 antonma Exp $
00024  * --------------------------------------------------------------------------
00025  */
00026 
00027 package org.objectweb.jonas.webapp.taglib;
00028 
00029 import javax.servlet.jsp.JspException;
00030 
00031 public class JonasGridRowTitleTag extends GridRowTag {
00032 
00033 // ------------------------------------------------------------- Constants
00034 
00035     public static final String CLASS_TITLE = "panelTitle";
00036 
00037 // ------------------------------------------------------------- Instance Variables
00038 
00039     private boolean mb_ForceStyleClass = false;
00040 
00041 // ------------------------------------------------------------- Properties
00042 
00043     private String level = null;
00044 
00045     public String getLevel() {
00046         return level;
00047     }
00048 
00049     public void setLevel(String level) {
00050         this.level = level;
00051     }
00052 
00053 // ----------------------------------------------------- Public Methods
00054 
00060     public int doStartTag()
00061         throws JspException {
00062         // Set default value
00063         mb_ForceStyleClass = false;
00064         if (getStyleClass() == null) {
00065             setStyleClass(getStyleClassLevel());
00066             mb_ForceStyleClass = true;
00067         }
00068         return super.doStartTag();
00069     }
00070 
00071     public void release() {
00072         super.release();
00073         level = null;
00074     }
00075 
00076     public String getStyleClassLevel() {
00077         if (level != null) {
00078             return new String((CLASS_TITLE + level));
00079         }
00080         return CLASS_TITLE;
00081     }
00082 
00088     public int doEndTag()
00089         throws JspException {
00090         int iRet = super.doEndTag();
00091         if (mb_ForceStyleClass == true) {
00092             mb_ForceStyleClass = false;
00093             setStyleClass(null);
00094         }
00095         return iRet;
00096     }
00097 }

Generated on Tue Feb 15 15:05:34 2005 for JOnAS by  doxygen 1.3.9.1