KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > thauvin > google > taglibs > StyleSupport


1 /*
2  * @(#)StyleSupport.java
3  *
4  * Copyright (c) 2002-2003, Erik C. Thauvin (erik@thauvin.net)
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are
9  * met:
10  *
11  * Redistributions of source code must retain the above copyright notice,
12  * this list of conditions and the following disclaimer.
13  *
14  * Redistributions in binary form must reproduce the above copyright notice,
15  * this list of conditions and the following disclaimer in the documentation
16  * and/or other materials provided with the distribution.
17  *
18  * Neither the name of the author nor the names of its contributors may be
19  * used to endorse or promote products derived from this software without
20  * specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
23  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
24  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
26  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
28  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  *
34  * $Id: StyleSupport.java,v 1.1.1.1 2003/09/24 14:59:03 ethauvin Exp $
35  *
36  */

37 package net.thauvin.google.taglibs;
38
39 import javax.servlet.jsp.tagext.BodyTagSupport JavaDoc;
40
41
42 /**
43  * Implements support for the style, target and css tag attributes.
44  *
45  * @author Erik C. Thauvin
46  * @created Sep 4, 2003
47  * @version $Revision: 1.1.1.1 $
48  * @since 1.0
49  */

50 public abstract class StyleSupport extends BodyTagSupport JavaDoc
51 {
52     /**
53      * The css attribute.
54      */

55     protected String JavaDoc css = null;
56
57     /**
58      * The style attribute.
59      */

60     protected String JavaDoc style = null;
61
62     /**
63      * The target attribute.
64      */

65     protected String JavaDoc target = null;
66
67     /**
68      * Sets the css attribute.
69      *
70      * @param css The new attribute value.
71      */

72     public final void setCss(String JavaDoc css)
73     {
74         this.css = css;
75     }
76
77     /**
78      * Sets the style attribute.
79      *
80      * @param style The new attribute value.
81      */

82     public final void setStyle(String JavaDoc style)
83     {
84         this.style = style;
85     }
86
87     /**
88      * Sets the target attribute.
89      *
90      * @param target The new attribute value.
91      */

92     public final void setTarget(String JavaDoc target)
93     {
94         this.target = target;
95     }
96
97     /**
98      * Release method.
99      */

100     public void release()
101     {
102         super.release();
103
104         // Reset the values
105
reset();
106     }
107
108     /**
109      * Reset the values.
110      */

111     protected void reset()
112     {
113         // Reset the target, style and css
114
target = style = css = null;
115     }
116 }
117
Popular Tags