001: /**
002: * org/ozone-db/xml/dom/html/HTMLImageElementImpl.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.HTMLImageElement
029: * @see ElementImpl
030: */
031: public final class HTMLImageElementImpl extends HTMLElementImpl
032: implements HTMLImageElement {
033:
034: public String getLowSrc() {
035: return getAttribute("lowsrc");
036: }
037:
038: public void setLowSrc(String lowSrc) {
039: setAttribute("lowsrc", lowSrc);
040: }
041:
042: public String getSrc() {
043: return getAttribute("src");
044: }
045:
046: public void setSrc(String src) {
047: setAttribute("src", src);
048: }
049:
050: public String getName() {
051: return getAttribute("name");
052: }
053:
054: public void setName(String name) {
055: setAttribute("name", name);
056: }
057:
058: public String getAlign() {
059: return capitalize(getAttribute("align"));
060: }
061:
062: public void setAlign(String align) {
063: setAttribute("align", align);
064: }
065:
066: public String getAlt() {
067: return getAttribute("alt");
068: }
069:
070: public void setAlt(String alt) {
071: setAttribute("alt", alt);
072: }
073:
074: public String getBorder() {
075: return getAttribute("border");
076: }
077:
078: public void setBorder(String border) {
079: setAttribute("border", border);
080: }
081:
082: public String getHeight() {
083: return getAttribute("height");
084: }
085:
086: public void setHeight(String height) {
087: setAttribute("height", height);
088: }
089:
090: public String getHspace() {
091: return getAttribute("hspace");
092: }
093:
094: public void setHspace(String hspace) {
095: setAttribute("hspace", hspace);
096: }
097:
098: public boolean getIsMap() {
099: return getAttribute("ismap") != null;
100: }
101:
102: public void setIsMap(boolean isMap) {
103: setAttribute("ismap", isMap ? "" : null);
104: }
105:
106: public String getLongDesc() {
107: return getAttribute("longdesc");
108: }
109:
110: public void setLongDesc(String longDesc) {
111: setAttribute("longdesc", longDesc);
112: }
113:
114: public String getUseMap() {
115: return getAttribute("useMap");
116: }
117:
118: public void setUseMap(String useMap) {
119: setAttribute("useMap", useMap);
120: }
121:
122: public String getVspace() {
123: return getAttribute("vspace");
124: }
125:
126: public void setVspace(String vspace) {
127: setAttribute("vspace", vspace);
128: }
129:
130: public String getWidth() {
131: return getAttribute("width");
132: }
133:
134: public void setWidth(String width) {
135: setAttribute("width", width);
136: }
137:
138: /**
139: * Constructor requires owner document.
140: *
141: * @param owner The owner HTML document
142: */
143: public HTMLImageElementImpl(HTMLDocumentImpl owner, String name) {
144: super (owner, "IMG");
145: }
146:
147: }
|