org.lobobrowser.html.domimpl

Class HTMLImageElementImpl

Implemented Interfaces:
Element, CSS2PropertiesContext, HTMLElement, HTMLImageElement, Node, ModelNode, ScriptableDelegate

public class HTMLImageElementImpl
extends HTMLAbstractUIElement
implements HTMLImageElement

Field Summary

Fields inherited from class org.lobobrowser.html.domimpl.ElementImpl

attributes

Fields inherited from class org.lobobrowser.html.domimpl.NodeImpl

document, logger, nodeList, notificationsSuspended, parentNode, treeLock, uiNode

Constructor Summary

HTMLImageElementImpl()
HTMLImageElementImpl(String name)

Method Summary

void
addImageListener(ImageListener listener)
Adds a listener of image loading events.
protected void
assignAttributeField(String normalName, String value)
protected RenderState
createRenderState(RenderState prevRenderState)
String
getAlign()
Aligns this object (vertically or horizontally) with respect to its surrounding text.
String
getAlt()
Alternate text for user agents not rendering the normal content of this element.
String
getBorder()
Width of border around image.
int
getHeight()
Height of the image in pixels.
int
getHspace()
Horizontal space to the left and right of this image in pixels.
java.awt.Image
getImage()
boolean
getIsMap()
Use server-side image map.
String
getLongDesc()
URI [IETF RFC 2396] designating a long description of this image or frame.
String
getName()
The name of the element (for backwards compatibility).
Function
getOnload()
String
getSrc()
URI [IETF RFC 2396] designating the source of this image.
String
getUseMap()
Use client-side image map.
int
getVspace()
Vertical space above and below this image in pixels.
int
getWidth()
The width of the image in pixels.
void
removeImageListener(ImageListener listener)
void
setAlign(String align)
Aligns this object (vertically or horizontally) with respect to its surrounding text.
void
setAlt(String alt)
Alternate text for user agents not rendering the normal content of this element.
void
setBorder(String border)
Width of border around image.
void
setHeight(int height)
Height of the image in pixels.
void
setHspace(int hspace)
Horizontal space to the left and right of this image in pixels.
void
setIsMap(boolean isMap)
Use server-side image map.
void
setLongDesc(String longDesc)
URI [IETF RFC 2396] designating a long description of this image or frame.
void
setName(String name)
The name of the element (for backwards compatibility).
void
setOnload(Function onload)
void
setSrc(String src)
Sets the image URI and starts to load the image.
void
setUseMap(String useMap)
Use client-side image map.
void
setVspace(int vspace)
Vertical space above and below this image in pixels.
void
setWidth(int width)
The width of the image in pixels.

Methods inherited from class org.lobobrowser.html.domimpl.HTMLAbstractUIElement

assignAttributeField, blur, focus, getEventFunction, getOnblur, getOnclick, getOncontextmenu, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, setOnblur, setOnclick, setOncontextmenu, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup

Methods inherited from class org.lobobrowser.html.domimpl.HTMLElementImpl

addStyleSheetDeclarations, appendInnerHTMLImpl, appendOuterHTMLImpl, assignAttributeField, createRenderState, findStyleDeclarations, forgetLocalStyle, forgetStyle, getAncestor, getAncestorForJavaClass, getAncestorWithClass, getAncestorWithId, getAttributeAsBoolean, getAttributeAsInt, getCharset, getClassName, getCssInputSourceForDecl, getCurrentStyle, getFormInputs, getInnerHTML, getOffsetHeight, getOffsetLeft, getOffsetTop, getOffsetWidth, getOuterHTML, getParentStyle, getStyle, informInvalid, informInvalidAttibute, informLayoutInvalid, setCharset, setClassName, setCurrentStyle, setInnerHTML, setMouseOver, setStyle, toString, warn, warn

Methods inherited from class org.lobobrowser.html.domimpl.ElementImpl

appendInnerTextImpl, assignAttributeField, createSimilarNode, equalAttributes, getAttribute, getAttributeNS, getAttributeNode, getAttributeNodeNS, getAttributes, getDir, getElementsByTagName, getElementsByTagNameNS, getId, getInnerText, getLang, getLocalName, getNodeName, getNodeType, getNodeValue, getRawInnerText, getSchemaTypeInfo, getTagName, getTitle, hasAttribute, hasAttributeNS, hasAttributes, isTagName, normalizeAttributeName, removeAttribute, removeAttributeNS, removeAttributeNode, setAttribute, setAttributeImpl, setAttributeNS, setAttributeNode, setAttributeNodeNS, setDir, setId, setIdAttribute, setIdAttributeNS, setIdAttributeNode, setInnerText, setLang, setNodeValue, setTitle, toString

Methods inherited from class org.lobobrowser.html.domimpl.NodeImpl

appendChild, cloneNode, compareDocumentPosition, createRenderState, createSimilarNode, equalAttributes, findUINode, forgetRenderState, getAlignmentX, getAlignmentY, getAttributes, getBaseURI, getChildNodes, getChildren, getChildrenArray, getDescendents, getDocumentItem, getDocumentURL, getFeature, getFirstChild, getFullURL, getHtmlRendererContext, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeList, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentModelNode, getParentNode, getParentRenderState, getPrefix, getPreviousSibling, getRenderState, getTextContent, getUINode, getUserAgentContext, getUserData, hasAttributes, hasChildNodes, informExternalScriptLoading, informInvalid, informLayoutInvalid, informLookInvalid, informNodeLoaded, informPositionInvalid, informSizeInvalid, insertAfter, insertAt, insertBefore, isDefaultNamespace, isEqualNode, isEqualOrDescendentOf, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeAllChildren, removeAllChildrenImpl, removeChild, removeChildAt, removeChildren, removeChildrenImpl, replaceAdjacentTextNodes, replaceAdjacentTextNodes, replaceChild, setDocumentItem, setNodeValue, setPrefix, setTextContent, setUINode, setUserData, toString, warn, warn

Methods inherited from class org.lobobrowser.js.AbstractScriptableDelegate

getScriptable, setScriptable

Constructor Details

HTMLImageElementImpl

public HTMLImageElementImpl()

HTMLImageElementImpl

public HTMLImageElementImpl(String name)

Method Details

addImageListener

public void addImageListener(ImageListener listener)
Adds a listener of image loading events. The listener gets called right away if there's already an image.
Parameters:
listener -

assignAttributeField

protected void assignAttributeField(String normalName,
                                    String value)
Overrides:
assignAttributeField in interface HTMLAbstractUIElement

createRenderState

protected RenderState createRenderState(RenderState prevRenderState)
Overrides:
createRenderState in interface HTMLElementImpl

getAlign

public String getAlign()
Aligns this object (vertically or horizontally) with respect to its surrounding text. See the align attribute definition in HTML 4.01. This attribute is deprecated in HTML 4.01.
Specified by:
getAlign in interface HTMLImageElement

getAlt

public String getAlt()
Alternate text for user agents not rendering the normal content of this element. See the alt attribute definition in HTML 4.01.
Specified by:
getAlt in interface HTMLImageElement

getBorder

public String getBorder()
Specified by:
getBorder in interface HTMLImageElement

getHeight

public int getHeight()
Specified by:
getHeight in interface HTMLImageElement
Version:
DOM Level 2

getHspace

public int getHspace()
Specified by:
getHspace in interface HTMLImageElement
Version:
DOM Level 2

getImage

public final java.awt.Image getImage()

getIsMap

public boolean getIsMap()
Use server-side image map. See the ismap attribute definition in HTML 4.01.
Specified by:
getIsMap in interface HTMLImageElement

getLongDesc

public String getLongDesc()
URI [IETF RFC 2396] designating a long description of this image or frame. See the longdesc attribute definition in HTML 4.01.
Specified by:
getLongDesc in interface HTMLImageElement

getName

public String getName()
The name of the element (for backwards compatibility).
Specified by:
getName in interface HTMLImageElement

getOnload

public Function getOnload()

getSrc

public String getSrc()
URI [IETF RFC 2396] designating the source of this image. See the src attribute definition in HTML 4.01.
Specified by:
getSrc in interface HTMLImageElement

getUseMap

public String getUseMap()
Use client-side image map. See the usemap attribute definition in HTML 4.01.
Specified by:
getUseMap in interface HTMLImageElement

getVspace

public int getVspace()
Specified by:
getVspace in interface HTMLImageElement
Version:
DOM Level 2

getWidth

public int getWidth()
Specified by:
getWidth in interface HTMLImageElement
Version:
DOM Level 2

removeImageListener

public void removeImageListener(ImageListener listener)

setAlign

public void setAlign(String align)
Aligns this object (vertically or horizontally) with respect to its surrounding text. See the align attribute definition in HTML 4.01. This attribute is deprecated in HTML 4.01.
Specified by:
setAlign in interface HTMLImageElement

setAlt

public void setAlt(String alt)
Alternate text for user agents not rendering the normal content of this element. See the alt attribute definition in HTML 4.01.
Specified by:
setAlt in interface HTMLImageElement

setBorder

public void setBorder(String border)
Specified by:
setBorder in interface HTMLImageElement

setHeight

public void setHeight(int height)
Specified by:
setHeight in interface HTMLImageElement
Version:
DOM Level 2

setHspace

public void setHspace(int hspace)
Specified by:
setHspace in interface HTMLImageElement
Version:
DOM Level 2

setIsMap

public void setIsMap(boolean isMap)
Use server-side image map. See the ismap attribute definition in HTML 4.01.
Specified by:
setIsMap in interface HTMLImageElement

setLongDesc

public void setLongDesc(String longDesc)
URI [IETF RFC 2396] designating a long description of this image or frame. See the longdesc attribute definition in HTML 4.01.
Specified by:
setLongDesc in interface HTMLImageElement

setName

public void setName(String name)
The name of the element (for backwards compatibility).
Specified by:
setName in interface HTMLImageElement

setOnload

public void setOnload(Function onload)

setSrc

public void setSrc(String src)
Sets the image URI and starts to load the image. Note that an HtmlRendererContext should be available to the HTML document for images to be loaded.
Specified by:
setSrc in interface HTMLImageElement

setUseMap

public void setUseMap(String useMap)
Use client-side image map. See the usemap attribute definition in HTML 4.01.
Specified by:
setUseMap in interface HTMLImageElement

setVspace

public void setVspace(int vspace)
Specified by:
setVspace in interface HTMLImageElement
Version:
DOM Level 2

setWidth

public void setWidth(int width)
Specified by:
setWidth in interface HTMLImageElement
Version:
DOM Level 2