001: /**
002: * org/ozone-db/xml/dom/html/HTMLObjectElementImpl.java
003: *
004: * The contents of this file are subject to the OpenXML Public
005: * License Version 1.0; you may not use this file except in compliance
006: * with the License. You may obtain a copy of the License at
007: * http://www.openxml.org/license.html
008: *
009: * THIS SOFTWARE IS DISTRIBUTED ON AN "AS IS" BASIS WITHOUT WARRANTY
010: * OF ANY KIND, EITHER EXPRESSED OR IMPLIED. THE INITIAL DEVELOPER
011: * AND ALL CONTRIBUTORS SHALL NOT BE LIABLE FOR ANY DAMAGES AS A
012: * RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
013: * DERIVATIVES. SEE THE LICENSE FOR THE SPECIFIC LANGUAGE GOVERNING
014: * RIGHTS AND LIMITATIONS UNDER THE LICENSE.
015: *
016: * The Initial Developer of this code under the License is Assaf Arkin.
017: * Portions created by Assaf Arkin are Copyright (C) 1998, 1999.
018: * All Rights Reserved.
019: */package org.ozoneDB.xml.dom.html;
020:
021: import org.ozoneDB.xml.dom.*;
022: import org.w3c.dom.*;
023: import org.w3c.dom.html.*;
024:
025: /**
026: * @version $Revision: 1.1 $ $Date: 2001/12/18 11:03:24 $
027: * @author <a href="mailto:arkin@trendline.co.il">Assaf Arkin</a>
028: * @see org.w3c.dom.html.HTMLObjectElement
029: * @see ElementImpl
030: */
031: public final class HTMLObjectElementImpl extends HTMLElementImpl
032: implements HTMLObjectElement, HTMLFormControl {
033:
034: public String getCode() {
035: return getAttribute("code");
036: }
037:
038: public void setCode(String code) {
039: setAttribute("code", code);
040: }
041:
042: public String getAlign() {
043: return capitalize(getAttribute("align"));
044: }
045:
046: public void setAlign(String align) {
047: setAttribute("align", align);
048: }
049:
050: public String getArchive() {
051: return getAttribute("archive");
052: }
053:
054: public void setArchive(String archive) {
055: setAttribute("archive", archive);
056: }
057:
058: public String getBorder() {
059: return getAttribute("border");
060: }
061:
062: public void setBorder(String border) {
063: setAttribute("border", border);
064: }
065:
066: public String getCodeBase() {
067: return getAttribute("codebase");
068: }
069:
070: public void setCodeBase(String codeBase) {
071: setAttribute("codebase", codeBase);
072: }
073:
074: public String getCodeType() {
075: return getAttribute("codetype");
076: }
077:
078: public void setCodeType(String codeType) {
079: setAttribute("codetype", codeType);
080: }
081:
082: public String getData() {
083: return getAttribute("data");
084: }
085:
086: public void setData(String data) {
087: setAttribute("data", data);
088: }
089:
090: public boolean getDeclare() {
091: return getAttribute("declare") != null;
092: }
093:
094: public void setDeclare(boolean declare) {
095: setAttribute("declare", declare ? "" : null);
096: }
097:
098: public String getHeight() {
099: return getAttribute("height");
100: }
101:
102: public void setHeight(String height) {
103: setAttribute("height", height);
104: }
105:
106: public String getHspace() {
107: return getAttribute("hspace");
108: }
109:
110: public void setHspace(String hspace) {
111: setAttribute("hspace", hspace);
112: }
113:
114: public String getName() {
115: return getAttribute("name");
116: }
117:
118: public void setName(String name) {
119: setAttribute("name", name);
120: }
121:
122: public String getStandby() {
123: return getAttribute("standby");
124: }
125:
126: public void setStandby(String standby) {
127: setAttribute("standby", standby);
128: }
129:
130: public int getTabIndex() {
131: try {
132: return Integer.parseInt(getAttribute("tabindex"));
133: } catch (NumberFormatException except) {
134: return 0;
135: }
136: }
137:
138: public void setTabIndex(int tabIndex) {
139: setAttribute("tabindex", String.valueOf(tabIndex));
140: }
141:
142: public String getType() {
143: return getAttribute("type");
144: }
145:
146: public void setType(String type) {
147: setAttribute("type", type);
148: }
149:
150: public String getUseMap() {
151: return getAttribute("useMap");
152: }
153:
154: public void setUseMap(String useMap) {
155: setAttribute("useMap", useMap);
156: }
157:
158: public String getVspace() {
159: return getAttribute("vspace");
160: }
161:
162: public void setVspace(String vspace) {
163: setAttribute("vspace", vspace);
164: }
165:
166: public String getWidth() {
167: return getAttribute("width");
168: }
169:
170: public void setWidth(String width) {
171: setAttribute("width", width);
172: }
173:
174: /**
175: * Constructor requires owner document.
176: *
177: * @param owner The owner HTML document
178: */
179: public HTMLObjectElementImpl(HTMLDocumentImpl owner, String name) {
180: super (owner, "OBJECT");
181: }
182:
183: }
|