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
,Element
,HTMLElement
,HTMLImageElement
,Node
-
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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
addImageListener
(ImageListener listener) Adds a listener of image loading events.protected void
assignAttributeField
(String normalName, String value) protected RenderState
createRenderState
(RenderState prevRenderState) getAlign()
Aligns this object (vertically or horizontally) with respect to its surrounding text.getAlt()
Alternate text for user agents not rendering the normal content of this element.Width of border around image.int
Height of the image in pixels.int
Horizontal space to the left and right of this image in pixels.final Image
getImage()
boolean
getIsMap()
Use server-side image map.URI [IETF RFC 2396] designating a long description of this image or frame.getName()
The name of the element (for backwards compatibility).org.mozilla.javascript.Function
getSrc()
URI [IETF RFC 2396] designating the source of this image.Use client-side image map.int
Vertical space above and below this image in pixels.int
getWidth()
The width of the image in pixels.void
removeImageListener
(ImageListener listener) void
Aligns this object (vertically or horizontally) with respect to its surrounding text.void
Alternate text for user agents not rendering the normal content of this element.void
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
The name of the element (for backwards compatibility).void
setOnload
(org.mozilla.javascript.Function onload) void
Sets the image URI and starts to load the image.void
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, 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
-
Constructor Details
-
HTMLImageElementImpl
public HTMLImageElementImpl() -
HTMLImageElementImpl
-
-
Method Details
-
getName
Description copied from interface:HTMLImageElement
The name of the element (for backwards compatibility).- Specified by:
getName
in interfaceHTMLImageElement
-
setName
Description copied from interface:HTMLImageElement
The name of the element (for backwards compatibility).- Specified by:
setName
in interfaceHTMLImageElement
-
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 interfaceHTMLImageElement
-
setAlign
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 interfaceHTMLImageElement
-
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 interfaceHTMLImageElement
-
setAlt
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 interfaceHTMLImageElement
-
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 wasDOMString
in DOM Level 1 HTML [DOM Level 1] .- Specified by:
getBorder
in interfaceHTMLImageElement
-
setBorder
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 wasDOMString
in DOM Level 1 HTML [DOM Level 1] .- Specified by:
setBorder
in interfaceHTMLImageElement
-
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 wasDOMString
in DOM Level 1 HTML [DOM Level 1].- Specified by:
getHeight
in interfaceHTMLImageElement
-
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 wasDOMString
in DOM Level 1 HTML [DOM Level 1].- Specified by:
setHeight
in interfaceHTMLImageElement
-
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 wasDOMString
in DOM Level 1 HTML [DOM Level 1].- Specified by:
getHspace
in interfaceHTMLImageElement
-
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 wasDOMString
in DOM Level 1 HTML [DOM Level 1].- Specified by:
setHspace
in interfaceHTMLImageElement
-
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 interfaceHTMLImageElement
-
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 interfaceHTMLImageElement
-
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 interfaceHTMLImageElement
-
setLongDesc
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 interfaceHTMLImageElement
-
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 interfaceHTMLImageElement
-
setSrc
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 interfaceHTMLImageElement
-
getUseMap
Description copied from interface:HTMLImageElement
Use client-side image map. See the usemap attribute definition in HTML 4.01.- Specified by:
getUseMap
in interfaceHTMLImageElement
-
setUseMap
Description copied from interface:HTMLImageElement
Use client-side image map. See the usemap attribute definition in HTML 4.01.- Specified by:
setUseMap
in interfaceHTMLImageElement
-
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 interfaceHTMLImageElement
-
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 interfaceHTMLImageElement
-
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 wasDOMString
in DOM Level 1 HTML [DOM Level 1].- Specified by:
getWidth
in interfaceHTMLImageElement
-
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 wasDOMString
in DOM Level 1 HTML [DOM Level 1].- Specified by:
setWidth
in interfaceHTMLImageElement
-
assignAttributeField
- Overrides:
assignAttributeField
in classHTMLAbstractUIElement
-
getOnload
public org.mozilla.javascript.Function getOnload() -
setOnload
public void setOnload(org.mozilla.javascript.Function onload) -
getImage
-
addImageListener
Adds a listener of image loading events. The listener gets called right away if there's already an image.- Parameters:
listener
-
-
removeImageListener
-
createRenderState
- Overrides:
createRenderState
in classHTMLElementImpl
-