KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > custom > tabbedpane > HtmlPanelTabbedPaneTag


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.tabbedpane;
17
18 import org.apache.myfaces.renderkit.html.HTML;
19 import org.apache.myfaces.taglib.html.ext.HtmlPanelGroupTag;
20
21 import javax.faces.component.UIComponent;
22
23 /**
24  * @author Manfred Geiler (latest modification by $Author: oros $)
25  * @version $Revision: 1.8 $ $Date: 2004/11/26 14:29:12 $
26  */

27 public class HtmlPanelTabbedPaneTag
28         extends HtmlPanelGroupTag
29 {
30     //private static final Log log = LogFactory.getLog(HtmlPanelTabbedPaneTag.class);
31

32     public String JavaDoc getComponentType()
33     {
34         return HtmlPanelTabbedPane.COMPONENT_TYPE;
35     }
36
37     public String JavaDoc getRendererType()
38     {
39         return "org.apache.myfaces.TabbedPane";
40     }
41
42
43     // HtmlPanelTabbedPane attributes
44
private String JavaDoc _selectedIndex;
45
46     // HTML table attributes
47
private String JavaDoc _align;
48     private String JavaDoc _bgcolor;
49     private String JavaDoc _border;
50     private String JavaDoc _cellpadding;
51     private String JavaDoc _cellspacing;
52     private String JavaDoc _datafld;
53     private String JavaDoc _datasrc;
54     private String JavaDoc _dataformatas;
55     private String JavaDoc _frame;
56     private String JavaDoc _rules;
57     private String JavaDoc _summary;
58     private String JavaDoc _width;
59     private String JavaDoc _activeTabStyleClass;
60     private String JavaDoc _inactiveTabStyleClass;
61     private String JavaDoc _disabledTabStyleClass;
62     private String JavaDoc _activeSubStyleClass;
63     private String JavaDoc _inactiveSubStyleClass;
64     private String JavaDoc _tabContentStyleClass;
65     // User Role support --> already handled by HtmlPanelGroupTag
66

67
68     protected void setProperties(UIComponent component)
69     {
70         super.setProperties(component);
71
72         setIntegerProperty(component, "selectedIndex", _selectedIndex);
73
74         setStringProperty(component, HTML.ALIGN_ATTR, _align);
75         setStringProperty(component, HTML.BGCOLOR_ATTR, _bgcolor);
76         setStringProperty(component, HTML.BORDER_ATTR, _border);
77         setStringProperty(component, HTML.CELLPADDING_ATTR, _cellpadding);
78         setStringProperty(component, HTML.CELLSPACING_ATTR, _cellspacing);
79         setStringProperty(component, HTML.DATAFLD_ATTR, _datafld);
80         setStringProperty(component, HTML.DATASRC_ATTR, _datasrc);
81         setStringProperty(component, HTML.DATAFORMATAS_ATTR, _dataformatas);
82         setStringProperty(component, HTML.FRAME_ATTR, _frame);
83         setStringProperty(component, HTML.RULES_ATTR, _rules);
84         setStringProperty(component, HTML.SUMMARY_ATTR, _summary);
85         setStringProperty(component, HTML.WIDTH_ATTR, _width);
86         setStringProperty(component, "activeTabStyleClass", _activeTabStyleClass);
87         setStringProperty(component, "inactiveTabStyleClass", _inactiveTabStyleClass);
88         setStringProperty(component, "disabledTabStyleClass", _disabledTabStyleClass);
89         setStringProperty(component, "activeSubStyleClass", _activeSubStyleClass);
90         setStringProperty(component, "inactiveSubStyleClass", _inactiveSubStyleClass);
91         setStringProperty(component, "tabContentStyleClass", _tabContentStyleClass);
92     }
93
94
95     public void setSelectedIndex(String JavaDoc selectedIndex)
96     {
97         _selectedIndex = selectedIndex;
98     }
99
100     public void setAlign(String JavaDoc align)
101     {
102         _align = align;
103     }
104
105     public void setBgcolor(String JavaDoc bgcolor)
106     {
107         _bgcolor = bgcolor;
108     }
109
110     public void setBorder(String JavaDoc border)
111     {
112         _border = border;
113     }
114
115     public void setCellpadding(String JavaDoc cellpadding)
116     {
117         _cellpadding = cellpadding;
118     }
119
120     public void setCellspacing(String JavaDoc cellspacing)
121     {
122         _cellspacing = cellspacing;
123     }
124
125     public void setDatafld(String JavaDoc datafld)
126     {
127         _datafld = datafld;
128     }
129
130     public void setDatasrc(String JavaDoc datasrc)
131     {
132         _datasrc = datasrc;
133     }
134
135     public void setDataformatas(String JavaDoc dataformatas)
136     {
137         _dataformatas = dataformatas;
138     }
139
140     public void setFrame(String JavaDoc frame)
141     {
142         _frame = frame;
143     }
144
145     public void setRules(String JavaDoc rules)
146     {
147         _rules = rules;
148     }
149
150     public void setSummary(String JavaDoc summary)
151     {
152         _summary = summary;
153     }
154
155     public void setWidth(String JavaDoc width)
156     {
157         _width = width;
158     }
159
160
161     public void setActiveTabStyleClass(String JavaDoc activeTabStyleClass)
162     {
163         _activeTabStyleClass = activeTabStyleClass;
164     }
165
166
167     public void setInactiveTabStyleClass(String JavaDoc inactiveTabStyleClass)
168     {
169         _inactiveTabStyleClass = inactiveTabStyleClass;
170     }
171
172
173     public void setActiveSubStyleClass(String JavaDoc activeSubStyleClass)
174     {
175         _activeSubStyleClass = activeSubStyleClass;
176     }
177
178
179     public void setInactiveSubStyleClass(String JavaDoc inactiveSubStyleClass)
180     {
181         _inactiveSubStyleClass = inactiveSubStyleClass;
182     }
183
184
185     public void setTabContentStyleClass(String JavaDoc tabContentStyleClass)
186     {
187         _tabContentStyleClass = tabContentStyleClass;
188     }
189
190
191     public String JavaDoc getDisabledTabStyleClass()
192     {
193         return _disabledTabStyleClass;
194     }
195
196
197     public void setDisabledTabStyleClass(String JavaDoc disabledTabStyleClass)
198     {
199         this._disabledTabStyleClass = disabledTabStyleClass;
200     }
201
202 }
203
Popular Tags