KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ecs > html > TFoot


1 /*
2  * ====================================================================
3  *
4  * The Apache Software License, Version 1.1
5  *
6  * Copyright (c) 1999-2003 The Apache Software Foundation. All rights
7  * reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  *
13  * 1. Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  *
16  * 2. Redistributions in binary form must reproduce the above copyright
17  * notice, this list of conditions and the following disclaimer in
18  * the documentation and/or other materials provided with the
19  * distribution.
20  *
21  * 3. The end-user documentation included with the redistribution, if
22  * any, must include the following acknowlegement:
23  * "This product includes software developed by the
24  * Apache Software Foundation (http://www.apache.org/)."
25  * Alternately, this acknowlegement may appear in the software itself,
26  * if and wherever such third-party acknowlegements normally appear.
27  *
28  * 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
29  * "Jakarta ECS" , and "Apache Software Foundation" must not be used
30  * to endorse or promote products derived
31  * from this software without prior written permission. For written
32  * permission, please contact apache@apache.org.
33  *
34  * 5. Products derived from this software may not be called "Apache",
35  * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
36  * appear in their names without prior written permission of the Apache Group.
37  *
38  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
39  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
40  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
41  * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
42  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
43  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
44  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
45  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
46  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
47  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
48  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
49  * SUCH DAMAGE.
50  * ====================================================================
51  *
52  * This software consists of voluntary contributions made by many
53  * individuals on behalf of the Apache Software Foundation. For more
54  * information on the Apache Software Foundation, please see
55  * <http://www.apache.org/>.
56  *
57  */

58 package org.apache.ecs.html;
59
60 import org.apache.ecs.*;
61
62 /**
63     This class creates a &lt;TFOOT&gt; object.
64     @version $Id: TFoot.java,v 1.4 2003/04/27 09:03:39 rdonkin Exp $
65     @author <a HREF="mailto:snagy@servletapi.com">Stephan Nagy</a>
66     @author <a HREF="mailto:jon@clearink.com">Jon S. Stevens</a>
67 */

68 public class TFoot extends MultiPartElement implements Printable, MouseEvents, KeyEvents
69 {
70     /**
71         private initializer.
72     */

73     {
74         setElementType("tfoot");
75     }
76     public TFoot()
77     {
78     }
79
80     /**
81         Sets the SPAN="" attribute.
82         @param span sets the SPAN="" attribute.
83     */

84     public TFoot setSpan(String JavaDoc span)
85     {
86         addAttribute("span",span);
87         return(this);
88     }
89
90     /**
91         Sets the SPAN="" attribute.
92         @param span sets the SPAN="" attribute.
93     */

94     public TFoot setSpan(int span)
95     {
96         addAttribute("span",Integer.toString(span));
97         return(this);
98     }
99
100     /**
101         Supplies user agents with a recommended cell width. (Pixel Values)
102         @param width how many pixels to make cell
103     */

104     public TFoot setWidth(int width)
105     {
106         addAttribute("width",Integer.toString(width));
107         return(this);
108     }
109     
110     /**
111         Supplies user agents with a recommended cell width. (Pixel Values)
112         @param width how many pixels to make cell
113     */

114     public TFoot setWidth(String JavaDoc width)
115     {
116         addAttribute("width",width);
117         return(this);
118     }
119
120     /**
121         Sets the ALIGN="" attribute convience variables are provided in the AlignType interface
122         @param align Sets the ALIGN="" attribute
123     */

124     public TFoot setAlign(String JavaDoc align)
125     {
126         addAttribute("align",align);
127         return(this);
128     }
129
130     /**
131         Sets the VALIGN="" attribute convience variables are provided in the AlignType interface
132         @param valign Sets the ALIGN="" attribute
133     */

134     public TFoot setVAlign(String JavaDoc valign)
135     {
136         addAttribute("valign",valign);
137         return(this);
138     }
139
140     /**
141         Sets the CHAR="" attribute.
142         @param character the character to use for alignment.
143     */

144     public TFoot setChar(String JavaDoc character)
145     {
146         addAttribute("char",character);
147         return(this);
148     }
149
150     /**
151         Sets the CHAROFF="" attribute.
152         @param char_off When present this attribute specifies the offset
153         of the first occurrence of the alignment character on each line.
154     */

155     public TFoot setCharOff(int char_off)
156     {
157         addAttribute("charoff",Integer.toString(char_off));
158         return(this);
159     }
160
161     /**
162         Sets the CHAROFF="" attribute.
163         @param char_off When present this attribute specifies the offset
164         of the first occurrence of the alignment character on each line.
165     */

166     public TFoot setCharOff(String JavaDoc char_off)
167     {
168         addAttribute("charoff",char_off);
169         return(this);
170     }
171     
172     /**
173         Adds an Element to the element.
174         @param hashcode name of element for hash table
175         @param element Adds an Element to the element.
176      */

177     public TFoot addElement(String JavaDoc hashcode,Element element)
178     {
179         addElementToRegistry(hashcode,element);
180         return(this);
181     }
182
183     /**
184         Adds an Element to the element.
185         @param hashcode name of element for hash table
186         @param element Adds an Element to the element.
187      */

188     public TFoot addElement(String JavaDoc hashcode,String JavaDoc element)
189     {
190         addElementToRegistry(hashcode,element);
191         return(this);
192     }
193
194     /**
195         Adds an Element to the element.
196         @param element Adds an Element to the element.
197      */

198     public TFoot addElement(Element element)
199     {
200         addElementToRegistry(element);
201         return(this);
202     }
203
204     /**
205         Adds an Element to the element.
206         @param element Adds an Element to the element.
207      */

208     public TFoot addElement(String JavaDoc element)
209     {
210         addElementToRegistry(element);
211         return(this);
212     }
213     /**
214         Removes an Element from the element.
215         @param hashcode the name of the element to be removed.
216     */

217     public TFoot removeElement(String JavaDoc hashcode)
218     {
219         removeElementFromRegistry(hashcode);
220         return(this);
221     }
222
223     /**
224         The onclick event occurs when the pointing device button is clicked
225         over an element. This attribute may be used with most elements.
226         
227         @param The script
228     */

229     public void setOnClick(String JavaDoc script)
230     {
231         addAttribute ( "onClick", script );
232     }
233     /**
234         The ondblclick event occurs when the pointing device button is double
235         clicked over an element. This attribute may be used with most elements.
236
237         @param The script
238     */

239     public void setOnDblClick(String JavaDoc script)
240     {
241         addAttribute ( "onDblClick", script );
242     }
243     /**
244         The onmousedown event occurs when the pointing device button is pressed
245         over an element. This attribute may be used with most elements.
246
247         @param The script
248     */

249     public void setOnMouseDown(String JavaDoc script)
250     {
251         addAttribute ( "onMouseDown", script );
252     }
253     /**
254         The onmouseup event occurs when the pointing device button is released
255         over an element. This attribute may be used with most elements.
256
257         @param The script
258     */

259     public void setOnMouseUp(String JavaDoc script)
260     {
261         addAttribute ( "onMouseUp", script );
262     }
263     /**
264         The onmouseover event occurs when the pointing device is moved onto an
265         element. This attribute may be used with most elements.
266
267         @param The script
268     */

269     public void setOnMouseOver(String JavaDoc script)
270     {
271         addAttribute ( "onMouseOver", script );
272     }
273     /**
274         The onmousemove event occurs when the pointing device is moved while it
275         is over an element. This attribute may be used with most elements.
276
277         @param The script
278     */

279     public void setOnMouseMove(String JavaDoc script)
280     {
281         addAttribute ( "onMouseMove", script );
282     }
283     /**
284         The onmouseout event occurs when the pointing device is moved away from
285         an element. This attribute may be used with most elements.
286
287         @param The script
288     */

289     public void setOnMouseOut(String JavaDoc script)
290     {
291         addAttribute ( "onMouseOut", script );
292     }
293
294     /**
295         The onkeypress event occurs when a key is pressed and released over an
296         element. This attribute may be used with most elements.
297         
298         @param The script
299     */

300     public void setOnKeyPress(String JavaDoc script)
301     {
302         addAttribute ( "onKeyPress", script );
303     }
304
305     /**
306         The onkeydown event occurs when a key is pressed down over an element.
307         This attribute may be used with most elements.
308         
309         @param The script
310     */

311     public void setOnKeyDown(String JavaDoc script)
312     {
313         addAttribute ( "onKeyDown", script );
314     }
315
316     /**
317         The onkeyup event occurs when a key is released over an element. This
318         attribute may be used with most elements.
319         
320         @param The script
321     */

322     public void setOnKeyUp(String JavaDoc script)
323     {
324         addAttribute ( "onKeyUp", script );
325     }
326 }
327
Popular Tags