1 /* DomHTMLObjectElement.java --
2    Copyright (C) 2005 Free Software Foundation, Inc.
3 
4 This file is part of GNU Classpath.
5 
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10 
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING.  If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 02110-1301 USA.
20 
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library.  Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
25 
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module.  An independent module is a module which is not derived from
33 or based on this library.  If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so.  If you do not wish to do so, delete this
36 exception statement from your version. */
37 
38 package gnu.xml.dom.html2;
39 
40 import org.w3c.dom.Document;
41 import org.w3c.dom.html2.HTMLFormElement;
42 import org.w3c.dom.html2.HTMLObjectElement;
43 
44 /**
45  * An HTML 'OBJECT' element node.
46  *
47  * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
48  */
49 public class DomHTMLObjectElement
50   extends DomHTMLElement
51   implements HTMLObjectElement
52 {
53 
DomHTMLObjectElement(DomHTMLDocument owner, String namespaceURI, String name)54   protected DomHTMLObjectElement(DomHTMLDocument owner, String namespaceURI,
55                                  String name)
56   {
57     super(owner, namespaceURI, name);
58   }
59 
getForm()60   public HTMLFormElement getForm()
61   {
62     return (HTMLFormElement) getParentElement("form");
63   }
64 
getCode()65   public String getCode()
66   {
67     return getHTMLAttribute("code");
68   }
69 
setCode(String code)70   public void setCode(String code)
71   {
72     setHTMLAttribute("code", code);
73   }
74 
getJavaCode()75   public String getJavaCode()
76   {
77     return getHTMLAttribute("java_code");
78   }
79 
setJavaCode(String code)80   public void setJavaCode(String code)
81   {
82     setHTMLAttribute("java_code", code);
83   }
84 
getObject()85   public String getObject()
86   {
87     return getHTMLAttribute("object");
88   }
89 
setObject(String obj)90   public void setObject(String obj)
91   {
92     setHTMLAttribute("object", obj);
93   }
94 
getJavaObject()95   public String getJavaObject()
96   {
97     return getHTMLAttribute("java_object");
98   }
99 
setJavaObject(String obj)100   public void setJavaObject(String obj)
101   {
102     setHTMLAttribute("java_object", obj);
103   }
104 
getAlign()105   public String getAlign()
106   {
107     return getHTMLAttribute("align");
108   }
109 
setAlign(String align)110   public void setAlign(String align)
111   {
112     setHTMLAttribute("align", align);
113   }
114 
getArchive()115   public String getArchive()
116   {
117     return getHTMLAttribute("archive");
118   }
119 
setArchive(String archive)120   public void setArchive(String archive)
121   {
122     setHTMLAttribute("archive", archive);
123   }
124 
getJavaArchive()125   public String getJavaArchive()
126   {
127     return getHTMLAttribute("java_archive");
128   }
129 
setJavaArchive(String archive)130   public void setJavaArchive(String archive)
131   {
132     setHTMLAttribute("java_archive", archive);
133   }
134 
getBorder()135   public String getBorder()
136   {
137     return getHTMLAttribute("border");
138   }
139 
setBorder(String border)140   public void setBorder(String border)
141   {
142     setHTMLAttribute("border", border);
143   }
144 
getCodeBase()145   public String getCodeBase()
146   {
147     return getHTMLAttribute("codebase");
148   }
149 
setCodeBase(String codeBase)150   public void setCodeBase(String codeBase)
151   {
152     setHTMLAttribute("codebase", codeBase);
153   }
154 
getJavaCodeBase()155   public String getJavaCodeBase()
156   {
157     return getHTMLAttribute("java_codebase");
158   }
159 
setJavaCodeBase(String codeBase)160   public void setJavaCodeBase(String codeBase)
161   {
162     setHTMLAttribute("java_codebase", codeBase);
163   }
164 
getCodeType()165   public String getCodeType()
166   {
167     return getHTMLAttribute("codetype");
168   }
169 
setCodeType(String codeType)170   public void setCodeType(String codeType)
171   {
172     setHTMLAttribute("codetype", codeType);
173   }
174 
getData()175   public String getData()
176   {
177     return getHTMLAttribute("data");
178   }
179 
setData(String data)180   public void setData(String data)
181   {
182     setHTMLAttribute("data", data);
183   }
184 
getDeclare()185   public boolean getDeclare()
186   {
187     return getBooleanHTMLAttribute("declare");
188   }
189 
setDeclare(boolean declare)190   public void setDeclare(boolean declare)
191   {
192     setBooleanHTMLAttribute("declare", declare);
193   }
194 
getHeight()195   public String getHeight()
196   {
197     return getHTMLAttribute("height");
198   }
199 
setHeight(String height)200   public void setHeight(String height)
201   {
202     setHTMLAttribute("height", height);
203   }
204 
getHspace()205   public int getHspace()
206   {
207     return getIntHTMLAttribute("hspace");
208   }
209 
setHspace(int hspace)210   public void setHspace(int hspace)
211   {
212     setIntHTMLAttribute("hspace", hspace);
213   }
214 
getName()215   public String getName()
216   {
217     return getHTMLAttribute("name");
218   }
219 
setName(String name)220   public void setName(String name)
221   {
222     setHTMLAttribute("name", name);
223   }
224 
getStandby()225   public String getStandby()
226   {
227     return getHTMLAttribute("standby");
228   }
229 
setStandby(String standby)230   public void setStandby(String standby)
231   {
232     setHTMLAttribute("standby", standby);
233   }
234 
getTabIndex()235   public int getTabIndex()
236   {
237     return getIntHTMLAttribute("tabindex");
238   }
239 
setTabIndex(int tabIndex)240   public void setTabIndex(int tabIndex)
241   {
242     setIntHTMLAttribute("tabindex", tabIndex);
243   }
244 
getType()245   public String getType()
246   {
247     return getHTMLAttribute("type");
248   }
249 
setType(String type)250   public void setType(String type)
251   {
252     setHTMLAttribute("type", type);
253   }
254 
getJavaType()255   public String getJavaType()
256   {
257     return getHTMLAttribute("java_type");
258   }
259 
setJavaType(String type)260   public void setJavaType(String type)
261   {
262     setHTMLAttribute("java_type", type);
263   }
264 
getUseMap()265   public String getUseMap()
266   {
267     return getHTMLAttribute("usemap");
268   }
269 
setUseMap(String useMap)270   public void setUseMap(String useMap)
271   {
272     setHTMLAttribute("usemap", useMap);
273   }
274 
getVspace()275   public int getVspace()
276   {
277     return getIntHTMLAttribute("vspace");
278   }
279 
setVspace(int vspace)280   public void setVspace(int vspace)
281   {
282     setIntHTMLAttribute("vspace", vspace);
283   }
284 
getWidth()285   public String getWidth()
286   {
287     return getHTMLAttribute("width");
288   }
289 
setWidth(String width)290   public void setWidth(String width)
291   {
292     setHTMLAttribute("width", width);
293   }
294 
getContentDocument()295   public Document getContentDocument()
296   {
297     // TODO getContentDocument
298     return null;
299   }
300 
setMayscript(String may)301   public void setMayscript(String may)
302   {
303     setHTMLAttribute("mayscript", may);
304   }
305 
getMayscript()306   public String getMayscript()
307   {
308     return getHTMLAttribute("mayscript");
309   }
310 
setScriptable(String scr)311   public void setScriptable(String scr)
312   {
313     setHTMLAttribute("scriptable", scr);
314   }
315 
getScriptable()316   public String getScriptable()
317   {
318     return getHTMLAttribute("scriptable");
319   }
320 }
321