KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > lobobrowser > html > domimpl > HTMLObjectElementImpl


1 package org.lobobrowser.html.domimpl;
2
3 import org.w3c.dom.Document JavaDoc;
4 import org.w3c.dom.html2.HTMLFormElement;
5 import org.w3c.dom.html2.HTMLObjectElement;
6
7 public class HTMLObjectElementImpl extends HTMLAbstractUIElement implements
8         HTMLObjectElement {
9     public HTMLObjectElementImpl(String JavaDoc name) {
10         super(name);
11     }
12
13     public String JavaDoc getAlign() {
14         return this.getAttribute("align");
15     }
16
17     public String JavaDoc getAlt() {
18         return this.getAttribute("alt");
19     }
20
21     public String JavaDoc getArchive() {
22         return this.getAttribute("archive");
23     }
24
25     public String JavaDoc getCode() {
26         return this.getAttribute("code");
27     }
28
29     public String JavaDoc getCodeBase() {
30         return this.getAttribute("codebase");
31     }
32
33     public String JavaDoc getHeight() {
34         return this.getAttribute("height");
35     }
36
37     public String JavaDoc getName() {
38         return this.getAttribute("name");
39     }
40
41     public String JavaDoc getObject() {
42         return this.getAttribute("object");
43     }
44
45     public String JavaDoc getWidth() {
46         return this.getAttribute("width");
47     }
48
49     public void setAlign(String JavaDoc align) {
50         this.setAttribute("align", align);
51     }
52
53     public void setAlt(String JavaDoc alt) {
54         this.setAttribute("alt", alt);
55     }
56
57     public void setArchive(String JavaDoc archive) {
58         this.setAttribute("archive", archive);
59     }
60
61     public void setCode(String JavaDoc code) {
62         this.setAttribute("code", code);
63     }
64
65     public void setCodeBase(String JavaDoc codeBase) {
66         this.setAttribute("codebase", codeBase);
67     }
68
69     public void setHeight(String JavaDoc height) {
70         this.setAttribute("height", height);
71     }
72
73     public void setName(String JavaDoc name) {
74         this.setAttribute("name", name);
75     }
76
77     public void setObject(String JavaDoc object) {
78         this.setAttribute("object", object);
79     }
80
81     public void setWidth(String JavaDoc width) {
82         this.setAttribute("width", width);
83     }
84
85     public String JavaDoc getBorder() {
86         return this.getAttribute("border");
87     }
88
89     public String JavaDoc getCodeType() {
90         return this.getAttribute("codetype");
91     }
92
93     public Document JavaDoc getContentDocument() {
94         return this.getOwnerDocument();
95     }
96
97     public String JavaDoc getData() {
98         return this.getAttribute("data");
99     }
100
101     public boolean getDeclare() {
102         return "declare".equalsIgnoreCase(this.getAttribute("declare"));
103     }
104
105     public HTMLFormElement getForm() {
106         return (HTMLFormElement) this.getAncestorForJavaClass(HTMLFormElement.class);
107     }
108
109     public int getHspace() {
110         try {
111             return Integer.parseInt(this.getAttribute("hspace"));
112         } catch(Exception JavaDoc err) {
113             return 0;
114         }
115     }
116
117     public String JavaDoc getStandby() {
118         return this.getAttribute("standby");
119     }
120
121     public int getTabIndex() {
122         try {
123             return Integer.parseInt(this.getAttribute("tabindex"));
124         } catch(Exception JavaDoc err) {
125             return 0;
126         }
127     }
128
129     public String JavaDoc getType() {
130         return this.getAttribute("type");
131     }
132
133     public String JavaDoc getUseMap() {
134         return this.getAttribute("usemap");
135     }
136
137     public int getVspace() {
138         try {
139             return Integer.parseInt(this.getAttribute("vspace"));
140         } catch(Exception JavaDoc err) {
141             return 0;
142         }
143     }
144
145     public void setBorder(String JavaDoc border) {
146         this.setAttribute("border", border);
147     }
148
149     public void setCodeType(String JavaDoc codeType) {
150         this.setAttribute("codetype", codeType);
151     }
152
153     public void setData(String JavaDoc data) {
154         this.setAttribute("data", data);
155     }
156
157     public void setDeclare(boolean declare) {
158         this.setAttribute("declare", declare ? "declare" : null);
159     }
160
161     public void setHspace(int hspace) {
162         this.setAttribute("hspace", String.valueOf(hspace));
163     }
164
165     public void setStandby(String JavaDoc standby) {
166         this.setAttribute("standby", standby);
167     }
168
169     public void setTabIndex(int tabIndex) {
170         this.setAttribute("tabindex", String.valueOf(tabIndex));
171     }
172
173     public void setType(String JavaDoc type) {
174         this.setAttribute("type", type);
175     }
176
177     public void setUseMap(String JavaDoc useMap) {
178         this.setAttribute("usemap", useMap);
179     }
180
181     public void setVspace(int vspace) {
182         this.setAttribute("vspace", String.valueOf(vspace));
183     }
184 }
185
Popular Tags