KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ozoneDB > xml > dom > html > HTMLTableColElementImpl


1 /**
2  * org/ozone-db/xml/dom/html/HTMLTableColElementImpl.java
3  *
4  * The contents of this file are subject to the OpenXML Public
5  * License Version 1.0; you may not use this file except in compliance
6  * with the License. You may obtain a copy of the License at
7  * http://www.openxml.org/license.html
8  *
9  * THIS SOFTWARE IS DISTRIBUTED ON AN "AS IS" BASIS WITHOUT WARRANTY
10  * OF ANY KIND, EITHER EXPRESSED OR IMPLIED. THE INITIAL DEVELOPER
11  * AND ALL CONTRIBUTORS SHALL NOT BE LIABLE FOR ANY DAMAGES AS A
12  * RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
13  * DERIVATIVES. SEE THE LICENSE FOR THE SPECIFIC LANGUAGE GOVERNING
14  * RIGHTS AND LIMITATIONS UNDER THE LICENSE.
15  *
16  * The Initial Developer of this code under the License is Assaf Arkin.
17  * Portions created by Assaf Arkin are Copyright (C) 1998, 1999.
18  * All Rights Reserved.
19  */

20
21
22 package org.ozoneDB.xml.dom.html;
23
24
25 import org.ozoneDB.xml.dom.ElementImpl;
26 import org.w3c.dom.html.HTMLTableColElement;
27
28
29 /**
30  * @version $Revision: 1.2 $ $Date: 2003/11/20 23:18:42 $
31  * @author <a HREF="mailto:arkin@trendline.co.il">Assaf Arkin</a>
32  * @see org.w3c.dom.html.HTMLTableColElement
33  * @see ElementImpl
34  */

35 public final class HTMLTableColElementImpl extends HTMLElementImpl implements HTMLTableColElement {
36
37
38     public String JavaDoc getAlign() {
39         return capitalize( getAttribute( "align" ) );
40     }
41
42
43     public void setAlign( String JavaDoc align ) {
44         setAttribute( "align", align );
45     }
46
47
48     public String JavaDoc getCh() {
49         String JavaDoc ch;
50
51         // Make sure that the access key is a single character.
52
ch = getAttribute( "char" );
53         if (ch != null && ch.length() > 1) {
54             ch = ch.substring( 0, 1 );
55         }
56         return ch;
57     }
58
59
60     public void setCh( String JavaDoc ch ) {
61         // Make sure that the access key is a single character.
62
if (ch != null && ch.length() > 1) {
63             ch = ch.substring( 0, 1 );
64         }
65         setAttribute( "char", ch );
66     }
67
68
69     public String JavaDoc getChOff() {
70         return getAttribute( "charoff" );
71     }
72
73
74     public void setChOff( String JavaDoc chOff ) {
75         setAttribute( "charoff", chOff );
76     }
77
78
79     public int getSpan() {
80         return toInteger( getAttribute( "span" ) );
81     }
82
83
84     public void setSpan( int span ) {
85         setAttribute( "span", String.valueOf( span ) );
86     }
87
88
89     public String JavaDoc getVAlign() {
90         return capitalize( getAttribute( "valign" ) );
91     }
92
93
94     public void setVAlign( String JavaDoc vAlign ) {
95         setAttribute( "valign", vAlign );
96     }
97
98
99     public String JavaDoc getWidth() {
100         return getAttribute( "width" );
101     }
102
103
104     public void setWidth( String JavaDoc width ) {
105         setAttribute( "width", width );
106     }
107
108
109     /**
110      * Constructor requires owner document.
111      *
112      * @param owner The owner HTML document
113      */

114     public HTMLTableColElementImpl( HTMLDocumentImpl owner, String JavaDoc name ) {
115         super( owner, name );
116     }
117
118
119 }
120
Popular Tags