KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > apache > html > dom > HTMLObjectElementImpl


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

57 package org.enhydra.apache.html.dom;
58
59
60 import org.enhydra.apache.xerces.dom.ElementImpl;
61 import org.w3c.dom.Document JavaDoc;
62 import org.w3c.dom.html.HTMLObjectElement;
63
64
65 /**
66  * @version $Revision: 1.3 $ $Date: 2005/01/26 08:28:44 $
67  * @author <a HREF="mailto:arkin@exoffice.com">Assaf Arkin</a>
68  * @see org.w3c.dom.html.HTMLObjectElement
69  * @see ElementImpl
70  */

71 public class HTMLObjectElementImpl
72     extends HTMLElementImpl
73     implements HTMLObjectElement, HTMLFormControl
74 {
75     
76     
77
78     public String JavaDoc getCode()
79     {
80         return getAttribute( "code" );
81     }
82     
83     
84     public void setCode( String JavaDoc code )
85     {
86         setAttribute( "code", code );
87     }
88
89   
90     public String JavaDoc getAlign()
91     {
92         return capitalize( getAttribute( "align" ) );
93     }
94     
95     
96     public void setAlign( String JavaDoc align )
97     {
98         setAttribute( "align", align );
99     }
100   
101     
102     public String JavaDoc getArchive()
103     {
104         return getAttribute( "archive" );
105     }
106     
107     
108     public void setArchive( String JavaDoc archive )
109     {
110         setAttribute( "archive", archive );
111     }
112     
113     public String JavaDoc getBorder()
114     {
115         return getAttribute( "border" );
116     }
117     
118     
119     public void setBorder( String JavaDoc border )
120     {
121         setAttribute( "border", border );
122     }
123
124     
125     public String JavaDoc getCodeBase()
126     {
127         return getAttribute( "codebase" );
128     }
129     
130     
131     public void setCodeBase( String JavaDoc codeBase )
132     {
133         setAttribute( "codebase", codeBase );
134     }
135
136     
137     public String JavaDoc getCodeType()
138     {
139         return getAttribute( "codetype" );
140     }
141     
142     
143     public void setCodeType( String JavaDoc codeType )
144     {
145         setAttribute( "codetype", codeType );
146     }
147
148     
149     public String JavaDoc getData()
150     {
151         return getAttribute( "data" );
152     }
153     
154     
155     public void setData( String JavaDoc data )
156     {
157         setAttribute( "data", data );
158     }
159
160   
161       public boolean getDeclare()
162     {
163         return getBinary( "declare" );
164     }
165     
166     
167     public void setDeclare( boolean declare )
168     {
169         setAttribute( "declare", declare );
170     }
171
172     
173     public String JavaDoc getHeight()
174     {
175         return getAttribute( "height" );
176     }
177     
178     
179     public void setHeight( String JavaDoc height )
180     {
181         setAttribute( "height", height );
182     }
183
184     
185     public String JavaDoc getHspace()
186     {
187         return getAttribute( "hspace" );
188     }
189     
190     
191     public void setHspace( String JavaDoc hspace )
192     {
193         setAttribute( "hspace", hspace );
194     }
195   
196     public String JavaDoc getName()
197     {
198         return getAttribute( "name" );
199     }
200     
201     
202     public void setName( String JavaDoc name )
203     {
204         setAttribute( "name", name );
205     }
206
207     
208     public String JavaDoc getStandby()
209     {
210         return getAttribute( "standby" );
211     }
212     
213     
214     public void setStandby( String JavaDoc standby )
215     {
216         setAttribute( "standby", standby );
217     }
218   
219       public int getTabIndex()
220     {
221         try
222         {
223             return Integer.parseInt( getAttribute( "tabindex" ) );
224         }
225         catch ( NumberFormatException JavaDoc except )
226         {
227             return 0;
228         }
229     }
230     
231     
232     public void setTabIndex( int tabIndex )
233     {
234         setAttribute( "tabindex", String.valueOf( tabIndex ) );
235     }
236
237     
238     public String JavaDoc getType()
239     {
240         return getAttribute( "type" );
241     }
242     
243     
244     public void setType( String JavaDoc type )
245     {
246         setAttribute( "type", type );
247     }
248     
249     
250     public String JavaDoc getUseMap()
251     {
252         return getAttribute( "useMap" );
253     }
254     
255     
256     public void setUseMap( String JavaDoc useMap )
257     {
258         setAttribute( "useMap", useMap );
259     }
260     
261     
262     public String JavaDoc getVspace()
263     {
264         return getAttribute( "vspace" );
265     }
266     
267     
268     public void setVspace( String JavaDoc vspace )
269     {
270         setAttribute( "vspace", vspace );
271     }
272
273   
274     public String JavaDoc getWidth()
275     {
276         return getAttribute( "width" );
277     }
278     
279     
280     public void setWidth( String JavaDoc width )
281     {
282         setAttribute( "width", width );
283     }
284
285     
286     /**
287      * Constructor requires owner document.
288      *
289      * @param owner The owner HTML document
290      */

291     public HTMLObjectElementImpl( HTMLDocumentImpl owner, String JavaDoc name )
292     {
293         super( owner, name );
294     }
295
296     /**
297      * DL: temp hack
298      */

299     public Document JavaDoc getContentDocument() {
300     return null;
301     }
302
303 }
304
305
Popular Tags