org.lobobrowser.html.domimpl
Class HTMLImageElementImpl

java.lang.Object
  extended by org.lobobrowser.js.AbstractScriptableDelegate
      extended by org.lobobrowser.html.domimpl.NodeImpl
          extended by org.lobobrowser.html.domimpl.ElementImpl
              extended by org.lobobrowser.html.domimpl.HTMLElementImpl
                  extended by org.lobobrowser.html.domimpl.HTMLAbstractUIElement
                      extended by org.lobobrowser.html.domimpl.HTMLImageElementImpl
All Implemented Interfaces:
ModelNode, CSS2PropertiesContext, ScriptableDelegate, org.w3c.dom.Element, HTMLElement, HTMLImageElement, org.w3c.dom.Node

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
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
HTMLImageElementImpl()
           
HTMLImageElementImpl(java.lang.String name)
           
 
Method Summary
 void addImageListener(ImageListener listener)
          Adds a listener of image loading events.
protected  void assignAttributeField(java.lang.String normalName, java.lang.String value)
           
protected  RenderState createRenderState(RenderState prevRenderState)
           
 java.lang.String getAlign()
          Aligns this object (vertically or horizontally) with respect to its surrounding text.
 java.lang.String getAlt()
          Alternate text for user agents not rendering the normal content of this element.
 java.lang.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.
 java.lang.String getLongDesc()
          URI [IETF RFC 2396] designating a long description of this image or frame.
 java.lang.String getName()
          The name of the element (for backwards compatibility).
 org.mozilla.javascript.Function getOnload()
           
 java.lang.String getSrc()
          URI [IETF RFC 2396] designating the source of this image.
 java.lang.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(java.lang.String align)
          Aligns this object (vertically or horizontally) with respect to its surrounding text.
 void setAlt(java.lang.String alt)
          Alternate text for user agents not rendering the normal content of this element.
 void setBorder(java.lang.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(java.lang.String longDesc)
          URI [IETF RFC 2396] designating a long description of this image or frame.
 void setName(java.lang.String name)
          The name of the element (for backwards compatibility).
 void setOnload(org.mozilla.javascript.Function onload)
           
 void setSrc(java.lang.String src)
          Sets the image URI and starts to load the image.
 void setUseMap(java.lang.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
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, appendOuterHTMLImpl, findStyleDeclarations, forgetLocalStyle, forgetStyle, getAncestor, getAncestorForJavaClass, getAncestorWithClass, getAncestorWithId, getAttributeAsBoolean, getAttributeAsInt, getCharset, getClassName, getComputedStyle, getCssInputSourceForDecl, getCurrentStyle, getDocumentBaseURI, getFormInputs, getOffsetHeight, getOffsetLeft, getOffsetTop, getOffsetWidth, getOuterHTML, getParentStyle, getPseudoNames, getStyle, informInvalid, informInvalidAttibute, setCharset, setClassName, setCurrentStyle, setInnerHTML, setMouseOver, setStyle, toString, warn, warn
 
Methods inherited from class org.lobobrowser.html.domimpl.ElementImpl
appendInnerTextImpl, createSimilarNode, equalAttributes, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDir, getElementsByTagName, getElementsByTagNameNS, getId, getInnerText, getLang, getLocalName, getNodeName, getNodeType, getNodeValue, getRawInnerText, getSchemaTypeInfo, getTagName, getTitle, hasAttribute, hasAttributeNS, hasAttributes, isTagName, normalizeAttributeName, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeImpl, setAttributeNode, setAttributeNodeNS, setAttributeNS, setDir, setId, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setInnerText, setLang, setNodeValue, setTitle
 
Methods inherited from class org.lobobrowser.html.domimpl.NodeImpl
appendChild, appendInnerHTMLImpl, cloneNode, compareDocumentPosition, findUINode, forgetRenderState, getAlignmentX, getAlignmentY, getBaseURI, getChildNodes, getChildren, getChildrenArray, getDescendents, getDocumentItem, getDocumentURL, getFeature, getFirstChild, getFullURL, getHtmlRendererContext, getInnerHTML, getLastChild, getNamespaceURI, getNextSibling, getNodeList, getOwnerDocument, getParentModelNode, getParentNode, getParentRenderState, getPrefix, getPreviousSibling, getRenderState, getTextContent, getUINode, getUserAgentContext, getUserData, hasChildNodes, informExternalScriptLoading, informLayoutInvalid, informLookInvalid, informNodeLoaded, informPositionInvalid, informSizeInvalid, informStructureInvalid, insertAfter, insertAt, insertBefore, isDefaultNamespace, isEqualNode, isEqualOrDescendentOf, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeAllChildren, removeAllChildrenImpl, removeChild, removeChildAt, removeChildren, removeChildrenImpl, replaceAdjacentTextNodes, replaceAdjacentTextNodes, replaceChild, setDocumentItem, setPrefix, setTextContent, setUINode, setUserData
 
Methods inherited from class org.lobobrowser.js.AbstractScriptableDelegate
getScriptable, setScriptable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.html2.HTMLElement
getClassName, getDir, getId, getLang, getTitle, setClassName, setDir, setId, setLang, setTitle
 
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 
Methods inherited from interface org.lobobrowser.html.style.CSS2PropertiesContext
informLayoutInvalid, informLookInvalid, informPositionInvalid, informSizeInvalid
 

Constructor Detail

HTMLImageElementImpl

public HTMLImageElementImpl()

HTMLImageElementImpl

public HTMLImageElementImpl(java.lang.String name)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: HTMLImageElement
The name of the element (for backwards compatibility).

Specified by:
getName in interface HTMLImageElement

setName

public void setName(java.lang.String name)
Description copied from interface: HTMLImageElement
The name of the element (for backwards compatibility).

Specified by:
setName in interface HTMLImageElement

getAlign

public java.lang.String getAlign()
Description copied from interface: HTMLImageElement
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

setAlign

public void setAlign(java.lang.String align)
Description copied from interface: HTMLImageElement
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

getAlt

public java.lang.String getAlt()
Description copied from interface: HTMLImageElement
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

setAlt

public void setAlt(java.lang.String alt)
Description copied from interface: HTMLImageElement
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

getBorder

public java.lang.String getBorder()
Description copied from interface: HTMLImageElement
Width of border around image. See the border attribute definition in HTML 4.01. This attribute is deprecated in HTML 4.01. Note that the type of this attribute was DOMString in DOM Level 1 HTML [DOM Level 1] .

Specified by:
getBorder in interface HTMLImageElement

setBorder

public void setBorder(java.lang.String border)
Description copied from interface: HTMLImageElement
Width of border around image. See the border attribute definition in HTML 4.01. This attribute is deprecated in HTML 4.01. Note that the type of this attribute was DOMString in DOM Level 1 HTML [DOM Level 1] .

Specified by:
setBorder in interface HTMLImageElement

getHeight

public int getHeight()
Description copied from interface: HTMLImageElement
Height of the image in pixels. See the height attribute definition in HTML 4.01. Note that the type of this attribute was DOMString in DOM Level 1 HTML [DOM Level 1].

Specified by:
getHeight in interface HTMLImageElement

setHeight

public void setHeight(int height)
Description copied from interface: HTMLImageElement
Height of the image in pixels. See the height attribute definition in HTML 4.01. Note that the type of this attribute was DOMString in DOM Level 1 HTML [DOM Level 1].

Specified by:
setHeight in interface HTMLImageElement

getHspace

public int getHspace()
Description copied from interface: HTMLImageElement
Horizontal space to the left and right of this image in pixels. See the hspace attribute definition in HTML 4.01. This attribute is deprecated in HTML 4.01. Note that the type of this attribute was DOMString in DOM Level 1 HTML [DOM Level 1].

Specified by:
getHspace in interface HTMLImageElement

setHspace

public void setHspace(int hspace)
Description copied from interface: HTMLImageElement
Horizontal space to the left and right of this image in pixels. See the hspace attribute definition in HTML 4.01. This attribute is deprecated in HTML 4.01. Note that the type of this attribute was DOMString in DOM Level 1 HTML [DOM Level 1].

Specified by:
setHspace in interface HTMLImageElement

getIsMap

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

Specified by:
getIsMap in interface HTMLImageElement

setIsMap

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

Specified by:
setIsMap in interface HTMLImageElement

getLongDesc

public java.lang.String getLongDesc()
Description copied from interface: HTMLImageElement
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

setLongDesc

public void setLongDesc(java.lang.String longDesc)
Description copied from interface: HTMLImageElement
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

getSrc

public java.lang.String getSrc()
Description copied from interface: HTMLImageElement
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

setSrc

public void setSrc(java.lang.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

getUseMap

public java.lang.String getUseMap()
Description copied from interface: HTMLImageElement
Use client-side image map. See the usemap attribute definition in HTML 4.01.

Specified by:
getUseMap in interface HTMLImageElement

setUseMap

public void setUseMap(java.lang.String useMap)
Description copied from interface: HTMLImageElement
Use client-side image map. See the usemap attribute definition in HTML 4.01.

Specified by:
setUseMap in interface HTMLImageElement

getVspace

public int getVspace()
Description copied from interface: HTMLImageElement
Vertical space above and below this image in pixels. See the vspace attribute definition in HTML 4.01. This attribute is deprecated in HTML 4.01. Note that the type of this attribute was "DOMString" in DOM Level 1 HTML [DOM Level 1].

Specified by:
getVspace in interface HTMLImageElement

setVspace

public void setVspace(int vspace)
Description copied from interface: HTMLImageElement
Vertical space above and below this image in pixels. See the vspace attribute definition in HTML 4.01. This attribute is deprecated in HTML 4.01. Note that the type of this attribute was "DOMString" in DOM Level 1 HTML [DOM Level 1].

Specified by:
setVspace in interface HTMLImageElement

getWidth

public int getWidth()
Description copied from interface: HTMLImageElement
The width of the image in pixels. See the width attribute definition in HTML 4.01. Note that the type of this attribute was DOMString in DOM Level 1 HTML [DOM Level 1].

Specified by:
getWidth in interface HTMLImageElement

setWidth

public void setWidth(int width)
Description copied from interface: HTMLImageElement
The width of the image in pixels. See the width attribute definition in HTML 4.01. Note that the type of this attribute was DOMString in DOM Level 1 HTML [DOM Level 1].

Specified by:
setWidth in interface HTMLImageElement

assignAttributeField

protected void assignAttributeField(java.lang.String normalName,
                                    java.lang.String value)
Overrides:
assignAttributeField in class HTMLAbstractUIElement

getOnload

public org.mozilla.javascript.Function getOnload()

setOnload

public void setOnload(org.mozilla.javascript.Function onload)

getImage

public final java.awt.Image getImage()

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 -

removeImageListener

public void removeImageListener(ImageListener listener)

createRenderState

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