KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * org/ozone-db/xml/dom/html/HTMLObjectElementImpl.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.DOMExceptionImpl;
26 import org.ozoneDB.xml.dom.ElementImpl;
27 import org.w3c.dom.DOMException JavaDoc;
28 import org.w3c.dom.Document JavaDoc;
29 import org.w3c.dom.html.HTMLObjectElement;
30
31
32 /**
33  * @version $Revision: 1.2 $ $Date: 2003/11/20 23:18:42 $
34  * @author <a HREF="mailto:arkin@trendline.co.il">Assaf Arkin</a>
35  * @see org.w3c.dom.html.HTMLObjectElement
36  * @see ElementImpl
37  */

38 public final class HTMLObjectElementImpl extends HTMLElementImpl implements HTMLObjectElement, HTMLFormControl {
39
40
41     public String JavaDoc getCode() {
42         return getAttribute( "code" );
43     }
44
45
46     public void setCode( String JavaDoc code ) {
47         setAttribute( "code", code );
48     }
49
50
51     public String JavaDoc getAlign() {
52         return capitalize( getAttribute( "align" ) );
53     }
54
55
56     public void setAlign( String JavaDoc align ) {
57         setAttribute( "align", align );
58     }
59
60
61     public String JavaDoc getArchive() {
62         return getAttribute( "archive" );
63     }
64
65
66     public void setArchive( String JavaDoc archive ) {
67         setAttribute( "archive", archive );
68     }
69
70
71     public String JavaDoc getBorder() {
72         return getAttribute( "border" );
73     }
74
75
76     public void setBorder( String JavaDoc border ) {
77         setAttribute( "border", border );
78     }
79
80
81     public String JavaDoc getCodeBase() {
82         return getAttribute( "codebase" );
83     }
84
85
86     public void setCodeBase( String JavaDoc codeBase ) {
87         setAttribute( "codebase", codeBase );
88     }
89
90
91     public String JavaDoc getCodeType() {
92         return getAttribute( "codetype" );
93     }
94
95
96     public void setCodeType( String JavaDoc codeType ) {
97         setAttribute( "codetype", codeType );
98     }
99
100
101     public String JavaDoc getData() {
102         return getAttribute( "data" );
103     }
104
105
106     public void setData( String JavaDoc data ) {
107         setAttribute( "data", data );
108     }
109
110
111     public boolean getDeclare() {
112         return getAttribute( "declare" ) != null;
113     }
114
115
116     public void setDeclare( boolean declare ) {
117         setAttribute( "declare", declare ? "" : null );
118     }
119
120
121     public String JavaDoc getHeight() {
122         return getAttribute( "height" );
123     }
124
125
126     public void setHeight( String JavaDoc height ) {
127         setAttribute( "height", height );
128     }
129
130
131     public String JavaDoc getHspace() {
132         return getAttribute( "hspace" );
133     }
134
135
136     public void setHspace( String JavaDoc hspace ) {
137         setAttribute( "hspace", hspace );
138     }
139
140
141     public String JavaDoc getName() {
142         return getAttribute( "name" );
143     }
144
145
146     public void setName( String JavaDoc name ) {
147         setAttribute( "name", name );
148     }
149
150
151     public String JavaDoc getStandby() {
152         return getAttribute( "standby" );
153     }
154
155
156     public void setStandby( String JavaDoc standby ) {
157         setAttribute( "standby", standby );
158     }
159
160
161     public int getTabIndex() {
162         try {
163             return Integer.parseInt( getAttribute( "tabindex" ) );
164         } catch (NumberFormatException JavaDoc except) {
165             return 0;
166         }
167     }
168
169
170     public void setTabIndex( int tabIndex ) {
171         setAttribute( "tabindex", String.valueOf( tabIndex ) );
172     }
173
174
175     public String JavaDoc getType() {
176         return getAttribute( "type" );
177     }
178
179
180     public void setType( String JavaDoc type ) {
181         setAttribute( "type", type );
182     }
183
184
185     public String JavaDoc getUseMap() {
186         return getAttribute( "useMap" );
187     }
188
189
190     public void setUseMap( String JavaDoc useMap ) {
191         setAttribute( "useMap", useMap );
192     }
193
194
195     public String JavaDoc getVspace() {
196         return getAttribute( "vspace" );
197     }
198
199
200     public void setVspace( String JavaDoc vspace ) {
201         setAttribute( "vspace", vspace );
202     }
203
204
205     public String JavaDoc getWidth() {
206         return getAttribute( "width" );
207     }
208
209
210     public void setWidth( String JavaDoc width ) {
211         setAttribute( "width", width );
212     }
213
214     /**
215      * The document this object contains, if there is any and it is
216      * available, or <code>null</code> otherwise.
217      * @since DOM Level 2
218      */

219     public Document JavaDoc getContentDocument() {
220         throw new DOMExceptionImpl( DOMException.NOT_SUPPORTED_ERR,
221                 "HTMLObjectElementImpl.getContentDocument(): ozone's persistent DOM doesn't support DOM level 2 yet." );
222     }
223
224
225     /**
226      * Constructor requires owner document.
227      *
228      * @param owner The owner HTML document
229      */

230     public HTMLObjectElementImpl( HTMLDocumentImpl owner, String JavaDoc name ) {
231         super( owner, "OBJECT" );
232     }
233
234
235 }
236
Popular Tags