KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > custom > div > DivTag


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.myfaces.custom.div;
17
18 import javax.faces.component.UIComponent;
19 import org.apache.myfaces.taglib.html.HtmlOutputTextTagBase;
20 /**
21  * @author bdudney (latest modification by $Author: bdudney $)
22  * @version $Revision: 1.1 $ $Date: 2004/11/08 03:43:20 $
23  * $Log: DivTag.java,v $
24  * Revision 1.1 2004/11/08 03:43:20 bdudney
25  * Added a div element. x:div to use, inserts a div with class or style attributes
26  *
27  */

28 public class DivTag extends HtmlOutputTextTagBase {
29   private String JavaDoc _style = null;
30   private String JavaDoc _styleClass = null;
31
32   public String JavaDoc getComponentType() {
33     return Div.COMPONENT_TYPE;
34   }
35
36   public String JavaDoc getRendererType() {
37     return DivRenderer.RENDERER_TYPE;
38   }
39
40   public void release() {
41     super.release();
42     this._style = null;
43     this._styleClass = null;
44   }
45
46   /**
47    * overrides setProperties() form UIComponentTag.
48    */

49   protected void setProperties(UIComponent component) {
50     super.setProperties(component);
51     setStringProperty(component, "style", _style);
52     setStringProperty(component, "styleClass", _styleClass);
53   }
54
55   //---------------------------------------------only the Setters
56
public void setStyle(String JavaDoc style) {
57     this._style = style;
58   }
59
60   public void setStyleClass(String JavaDoc styleClass) {
61     this._styleClass = styleClass;
62   }
63 }
Popular Tags