001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.html.dom;
018:
019: import org.w3c.dom.html.HTMLObjectElement;
020:
021: /**
022: * @xerces.internal
023: * @version $Revision: 447255 $ $Date: 2006-09-18 01:36:42 -0400 (Mon, 18 Sep 2006) $
024: * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
025: * @see org.w3c.dom.html.HTMLObjectElement
026: * @see org.apache.xerces.dom.ElementImpl
027: */
028: public class HTMLObjectElementImpl extends HTMLElementImpl implements
029: HTMLObjectElement, HTMLFormControl {
030:
031: private static final long serialVersionUID = 2276953229932965067L;
032:
033: public String getCode() {
034: return getAttribute("code");
035: }
036:
037: public void setCode(String code) {
038: setAttribute("code", code);
039: }
040:
041: public String getAlign() {
042: return capitalize(getAttribute("align"));
043: }
044:
045: public void setAlign(String align) {
046: setAttribute("align", align);
047: }
048:
049: public String getArchive() {
050: return getAttribute("archive");
051: }
052:
053: public void setArchive(String archive) {
054: setAttribute("archive", archive);
055: }
056:
057: public String getBorder() {
058: return getAttribute("border");
059: }
060:
061: public void setBorder(String border) {
062: setAttribute("border", border);
063: }
064:
065: public String getCodeBase() {
066: return getAttribute("codebase");
067: }
068:
069: public void setCodeBase(String codeBase) {
070: setAttribute("codebase", codeBase);
071: }
072:
073: public String getCodeType() {
074: return getAttribute("codetype");
075: }
076:
077: public void setCodeType(String codeType) {
078: setAttribute("codetype", codeType);
079: }
080:
081: public String getData() {
082: return getAttribute("data");
083: }
084:
085: public void setData(String data) {
086: setAttribute("data", data);
087: }
088:
089: public boolean getDeclare() {
090: return getBinary("declare");
091: }
092:
093: public void setDeclare(boolean declare) {
094: setAttribute("declare", declare);
095: }
096:
097: public String getHeight() {
098: return getAttribute("height");
099: }
100:
101: public void setHeight(String height) {
102: setAttribute("height", height);
103: }
104:
105: public String getHspace() {
106: return getAttribute("hspace");
107: }
108:
109: public void setHspace(String hspace) {
110: setAttribute("hspace", hspace);
111: }
112:
113: public String getName() {
114: return getAttribute("name");
115: }
116:
117: public void setName(String name) {
118: setAttribute("name", name);
119: }
120:
121: public String getStandby() {
122: return getAttribute("standby");
123: }
124:
125: public void setStandby(String standby) {
126: setAttribute("standby", standby);
127: }
128:
129: public int getTabIndex() {
130: try {
131: return Integer.parseInt(getAttribute("tabindex"));
132: } catch (NumberFormatException except) {
133: return 0;
134: }
135: }
136:
137: public void setTabIndex(int tabIndex) {
138: setAttribute("tabindex", String.valueOf(tabIndex));
139: }
140:
141: public String getType() {
142: return getAttribute("type");
143: }
144:
145: public void setType(String type) {
146: setAttribute("type", type);
147: }
148:
149: public String getUseMap() {
150: return getAttribute("useMap");
151: }
152:
153: public void setUseMap(String useMap) {
154: setAttribute("useMap", useMap);
155: }
156:
157: public String getVspace() {
158: return getAttribute("vspace");
159: }
160:
161: public void setVspace(String vspace) {
162: setAttribute("vspace", vspace);
163: }
164:
165: public String getWidth() {
166: return getAttribute("width");
167: }
168:
169: public void setWidth(String width) {
170: setAttribute("width", width);
171: }
172:
173: /**
174: * Constructor requires owner document.
175: *
176: * @param owner The owner HTML document
177: */
178: public HTMLObjectElementImpl(HTMLDocumentImpl owner, String name) {
179: super(owner, name);
180: }
181:
182: }
|