Package org.lobobrowser.html.domimpl
Class HTMLImageElementImpl
- java.lang.Object
-
- org.lobobrowser.js.AbstractScriptableDelegate
-
- org.lobobrowser.html.domimpl.NodeImpl
-
- org.lobobrowser.html.domimpl.ElementImpl
-
- org.lobobrowser.html.domimpl.HTMLElementImpl
-
- org.lobobrowser.html.domimpl.HTMLAbstractUIElement
-
- 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
Constructors Constructor Description HTMLImageElementImpl()HTMLImageElementImpl(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddImageListener(ImageListener listener)Adds a listener of image loading events.protected voidassignAttributeField(java.lang.String normalName, java.lang.String value)protected RenderStatecreateRenderState(RenderState prevRenderState)java.lang.StringgetAlign()Aligns this object (vertically or horizontally) with respect to its surrounding text.java.lang.StringgetAlt()Alternate text for user agents not rendering the normal content of this element.java.lang.StringgetBorder()Width of border around image.intgetHeight()Height of the image in pixels.intgetHspace()Horizontal space to the left and right of this image in pixels.java.awt.ImagegetImage()booleangetIsMap()Use server-side image map.java.lang.StringgetLongDesc()URI [IETF RFC 2396] designating a long description of this image or frame.java.lang.StringgetName()The name of the element (for backwards compatibility).org.mozilla.javascript.FunctiongetOnload()java.lang.StringgetSrc()URI [IETF RFC 2396] designating the source of this image.java.lang.StringgetUseMap()Use client-side image map.intgetVspace()Vertical space above and below this image in pixels.intgetWidth()The width of the image in pixels.voidremoveImageListener(ImageListener listener)voidsetAlign(java.lang.String align)Aligns this object (vertically or horizontally) with respect to its surrounding text.voidsetAlt(java.lang.String alt)Alternate text for user agents not rendering the normal content of this element.voidsetBorder(java.lang.String border)Width of border around image.voidsetHeight(int height)Height of the image in pixels.voidsetHspace(int hspace)Horizontal space to the left and right of this image in pixels.voidsetIsMap(boolean isMap)Use server-side image map.voidsetLongDesc(java.lang.String longDesc)URI [IETF RFC 2396] designating a long description of this image or frame.voidsetName(java.lang.String name)The name of the element (for backwards compatibility).voidsetOnload(org.mozilla.javascript.Function onload)voidsetSrc(java.lang.String src)Sets the image URI and starts to load the image.voidsetUseMap(java.lang.String useMap)Use client-side image map.voidsetVspace(int vspace)Vertical space above and below this image in pixels.voidsetWidth(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, createDefaultStyleSheet, findStyleDeclarations, forgetLocalStyle, forgetStyle, getAncestor, getAncestorForJavaClass, getAncestorWithClass, getAncestorWithId, getAttributeAsBoolean, getAttributeAsInt, getCharset, getClassName, getComputedStyle, getCssInputSourceForDecl, getCurrentStyle, getDocumentBaseURI, getFormInputs, getOffsetHeight, getOffsetLeft, getOffsetTop, getOffsetWidth, getOuterHTML, getParent, getParentStyle, getParentWithClass, getParentWithId, getPreceedingSibling, getPreceedingSiblingElement, getPreceedingSiblingWithClass, getPreceedingSiblingWithId, getPseudoNames, getStyle, informInvalid, informInvalidAttibute, setCharset, setClassName, setCurrentStyle, setInnerHTML, setMouseOver, setStyle, toString, warn, warn
-
Methods inherited from class org.lobobrowser.html.domimpl.ElementImpl
createSimilarNode, equalAttributes, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDir, getElementsByTagName, getElementsByTagNameNS, getId, getLang, getLocalName, getNodeName, getNodeType, getNodeValue, getRawInnerText, getSchemaTypeInfo, getTagName, getTitle, hasAttribute, hasAttributeNS, hasAttributes, htmlEncodeChildText, 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, appendInnerTextImpl, cloneNode, compareDocumentPosition, findUINode, forgetRenderState, getAlignmentX, getAlignmentY, getBaseURI, getChildNodes, getChildren, getChildrenArray, getDescendents, getDocumentItem, getDocumentURL, getFeature, getFirstChild, getFullURL, getHtmlRendererContext, getInnerHTML, getInnerText, getLastChild, getNamespaceURI, getNextSibling, getNodeList, getOwnerDocument, getParentModelNode, getParentNode, getParentRenderState, getPrefix, getPreviousSibling, getRenderState, getTextContent, getUINode, getUserAgentContext, getUserData, hasChildNodes, informDocumentInvalid, 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.lobobrowser.html.style.CSS2PropertiesContext
informLayoutInvalid, informLookInvalid, informPositionInvalid, informSizeInvalid
-
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.html2.HTMLElement
getClassName, getDir, getId, getLang, getTitle, setClassName, setDir, setId, setLang, setTitle
-
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
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:HTMLImageElementThe name of the element (for backwards compatibility).- Specified by:
getNamein interfaceHTMLImageElement
-
setName
public void setName(java.lang.String name)
Description copied from interface:HTMLImageElementThe name of the element (for backwards compatibility).- Specified by:
setNamein interfaceHTMLImageElement
-
getAlign
public java.lang.String getAlign()
Description copied from interface:HTMLImageElementAligns 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:
getAlignin interfaceHTMLImageElement
-
setAlign
public void setAlign(java.lang.String align)
Description copied from interface:HTMLImageElementAligns 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:
setAlignin interfaceHTMLImageElement
-
getAlt
public java.lang.String getAlt()
Description copied from interface:HTMLImageElementAlternate text for user agents not rendering the normal content of this element. See the alt attribute definition in HTML 4.01.- Specified by:
getAltin interfaceHTMLImageElement
-
setAlt
public void setAlt(java.lang.String alt)
Description copied from interface:HTMLImageElementAlternate text for user agents not rendering the normal content of this element. See the alt attribute definition in HTML 4.01.- Specified by:
setAltin interfaceHTMLImageElement
-
getBorder
public java.lang.String getBorder()
Description copied from interface:HTMLImageElementWidth 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 wasDOMStringin DOM Level 1 HTML [DOM Level 1] .- Specified by:
getBorderin interfaceHTMLImageElement
-
setBorder
public void setBorder(java.lang.String border)
Description copied from interface:HTMLImageElementWidth 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 wasDOMStringin DOM Level 1 HTML [DOM Level 1] .- Specified by:
setBorderin interfaceHTMLImageElement
-
getHeight
public int getHeight()
Description copied from interface:HTMLImageElementHeight of the image in pixels. See the height attribute definition in HTML 4.01. Note that the type of this attribute wasDOMStringin DOM Level 1 HTML [DOM Level 1].- Specified by:
getHeightin interfaceHTMLImageElement
-
setHeight
public void setHeight(int height)
Description copied from interface:HTMLImageElementHeight of the image in pixels. See the height attribute definition in HTML 4.01. Note that the type of this attribute wasDOMStringin DOM Level 1 HTML [DOM Level 1].- Specified by:
setHeightin interfaceHTMLImageElement
-
getHspace
public int getHspace()
Description copied from interface:HTMLImageElementHorizontal 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 wasDOMStringin DOM Level 1 HTML [DOM Level 1].- Specified by:
getHspacein interfaceHTMLImageElement
-
setHspace
public void setHspace(int hspace)
Description copied from interface:HTMLImageElementHorizontal 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 wasDOMStringin DOM Level 1 HTML [DOM Level 1].- Specified by:
setHspacein interfaceHTMLImageElement
-
getIsMap
public boolean getIsMap()
Description copied from interface:HTMLImageElementUse server-side image map. See the ismap attribute definition in HTML 4.01.- Specified by:
getIsMapin interfaceHTMLImageElement
-
setIsMap
public void setIsMap(boolean isMap)
Description copied from interface:HTMLImageElementUse server-side image map. See the ismap attribute definition in HTML 4.01.- Specified by:
setIsMapin interfaceHTMLImageElement
-
getLongDesc
public java.lang.String getLongDesc()
Description copied from interface:HTMLImageElementURI [IETF RFC 2396] designating a long description of this image or frame. See the longdesc attribute definition in HTML 4.01.- Specified by:
getLongDescin interfaceHTMLImageElement
-
setLongDesc
public void setLongDesc(java.lang.String longDesc)
Description copied from interface:HTMLImageElementURI [IETF RFC 2396] designating a long description of this image or frame. See the longdesc attribute definition in HTML 4.01.- Specified by:
setLongDescin interfaceHTMLImageElement
-
getSrc
public java.lang.String getSrc()
Description copied from interface:HTMLImageElementURI [IETF RFC 2396] designating the source of this image. See the src attribute definition in HTML 4.01.- Specified by:
getSrcin interfaceHTMLImageElement
-
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:
setSrcin interfaceHTMLImageElement
-
getUseMap
public java.lang.String getUseMap()
Description copied from interface:HTMLImageElementUse client-side image map. See the usemap attribute definition in HTML 4.01.- Specified by:
getUseMapin interfaceHTMLImageElement
-
setUseMap
public void setUseMap(java.lang.String useMap)
Description copied from interface:HTMLImageElementUse client-side image map. See the usemap attribute definition in HTML 4.01.- Specified by:
setUseMapin interfaceHTMLImageElement
-
getVspace
public int getVspace()
Description copied from interface:HTMLImageElementVertical 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:
getVspacein interfaceHTMLImageElement
-
setVspace
public void setVspace(int vspace)
Description copied from interface:HTMLImageElementVertical 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:
setVspacein interfaceHTMLImageElement
-
getWidth
public int getWidth()
Description copied from interface:HTMLImageElementThe width of the image in pixels. See the width attribute definition in HTML 4.01. Note that the type of this attribute wasDOMStringin DOM Level 1 HTML [DOM Level 1].- Specified by:
getWidthin interfaceHTMLImageElement
-
setWidth
public void setWidth(int width)
Description copied from interface:HTMLImageElementThe width of the image in pixels. See the width attribute definition in HTML 4.01. Note that the type of this attribute wasDOMStringin DOM Level 1 HTML [DOM Level 1].- Specified by:
setWidthin interfaceHTMLImageElement
-
assignAttributeField
protected void assignAttributeField(java.lang.String normalName, java.lang.String value)- Overrides:
assignAttributeFieldin classHTMLAbstractUIElement
-
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:
createRenderStatein classHTMLElementImpl
-
-