Package org.lobobrowser.html.domimpl
Class HTMLElementImpl
java.lang.Object
org.lobobrowser.js.AbstractScriptableDelegate
org.lobobrowser.html.domimpl.NodeImpl
org.lobobrowser.html.domimpl.ElementImpl
org.lobobrowser.html.domimpl.HTMLElementImpl
- All Implemented Interfaces:
ModelNode
,CSS2PropertiesContext
,ScriptableDelegate
,Element
,HTMLElement
,Node
- Direct Known Subclasses:
HTMLAbstractUIElement
,HTMLBaseElementImpl
,HTMLBRElementImpl
,HTMLFrameElementImpl
,HTMLFrameSetElementImpl
,HTMLHtmlElementImpl
,HTMLNonStandardElement
,HTMLOptionElementImpl
,HTMLScriptElementImpl
,HTMLStyleElementImpl
,HTMLTableRowElementImpl
,HTMLTitleElementImpl
-
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
ConstructorsConstructorDescriptionHTMLElementImpl
(String name) HTMLElementImpl
(String name, boolean noStyleSheet) -
Method Summary
Modifier and TypeMethodDescriptionprotected final AbstractCSS2Properties
addStyleSheetDeclarations
(AbstractCSS2Properties style, Set pseudoNames) Adds style sheet declarations applicable to this element.protected void
appendOuterHTMLImpl
(StringBuffer buffer) protected void
assignAttributeField
(String normalName, String value) protected AbstractCSS2Properties
protected RenderState
createRenderState
(RenderState prevRenderState) protected final Collection
findStyleDeclarations
(String elementName, String id, String className, Set pseudoNames) protected final void
protected final void
forgetStyle
(boolean deep) getAncestor
(String elementTL) protected Object
getAncestorForJavaClass
(Class javaClass) getAncestorWithClass
(String elementTL, String classTL) Get an ancestor that matches the element tag name given and the style class given.getAncestorWithId
(String elementTL, String idTL) boolean
getAttributeAsBoolean
(String name) protected int
getAttributeAsInt
(String name, int defaultValue) The class attribute of the element.getComputedStyle
(String pseudoElement) protected final InputSource
Gets the style object associated with the element.protected FormInput[]
Gets form input due to the current element.int
int
int
int
getParentWithClass
(String elementTL, String classTL) getParentWithId
(String elementTL, String idTL) getPreceedingSibling
(String elementTL) getPreceedingSiblingWithClass
(String elementTL, String classTL) getPreceedingSiblingWithId
(String elementTL, String idTL) Gets the pseudo-element lowercase names currently applicable to this element.getStyle()
Gets the local style object associated with the element.void
void
informInvalidAttibute
(String normalName) void
setCharset
(String charset) void
setClassName
(String className) The class attribute of the element.void
setCurrentStyle
(Object value) void
setInnerHTML
(String newHtml) void
setMouseOver
(boolean mouseOver) void
toString()
void
void
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
getDir, getId, getLang, getTitle, 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
-
HTMLElementImpl
-
HTMLElementImpl
-
-
Method Details
-
forgetLocalStyle
protected final void forgetLocalStyle() -
forgetStyle
protected final void forgetStyle(boolean deep) -
getCurrentStyle
Gets the style object associated with the element. It may return null only if the type of element does not handle stylesheets. -
getStyle
Gets the local style object associated with the element. The properties object returned only includes properties from the local style attribute. It may return null only if the type of element does not handle stylesheets. -
createDefaultStyleSheet
-
getComputedStyle
-
setStyle
-
setCurrentStyle
-
getClassName
Description copied from interface:HTMLElement
The class attribute of the element. This attribute has been renamed due to conflicts with the "class" keyword exposed by many languages. See the class attribute definition in HTML 4.01.- Specified by:
getClassName
in interfaceHTMLElement
-
setClassName
Description copied from interface:HTMLElement
The class attribute of the element. This attribute has been renamed due to conflicts with the "class" keyword exposed by many languages. See the class attribute definition in HTML 4.01.- Specified by:
setClassName
in interfaceHTMLElement
-
getCharset
-
setCharset
-
warn
-
warn
-
getAttributeAsInt
-
getAttributeAsBoolean
-
assignAttributeField
- Overrides:
assignAttributeField
in classElementImpl
-
getCssInputSourceForDecl
-
addStyleSheetDeclarations
protected final AbstractCSS2Properties addStyleSheetDeclarations(AbstractCSS2Properties style, Set pseudoNames) Adds style sheet declarations applicable to this element. A properties object is created if necessary when the one passed isnull
.- Parameters:
style
-
-
setMouseOver
public void setMouseOver(boolean mouseOver) -
getPseudoNames
Gets the pseudo-element lowercase names currently applicable to this element. Method must returnnull
if there are no such pseudo-elements. -
findStyleDeclarations
protected final Collection findStyleDeclarations(String elementName, String id, String className, Set pseudoNames) -
informInvalid
public void informInvalid()- Specified by:
informInvalid
in interfaceCSS2PropertiesContext
- Overrides:
informInvalid
in classNodeImpl
-
informInvalidAttibute
-
getFormInputs
Gets form input due to the current element. It should returnnull
except when the element is a form input element. -
getAncestorWithClass
Get an ancestor that matches the element tag name given and the style class given.- Parameters:
elementTL
- An tag name in lowercase or an asterisk (*).classTL
- A class name in lowercase.
-
getParentWithClass
-
getPreceedingSiblingElement
-
getPreceedingSiblingWithClass
-
getAncestorWithId
-
getParentWithId
-
getPreceedingSiblingWithId
-
getAncestor
-
getParent
-
getPreceedingSibling
-
getAncestorForJavaClass
-
setInnerHTML
-
getOuterHTML
-
appendOuterHTMLImpl
-
createRenderState
- Overrides:
createRenderState
in classNodeImpl
-
getOffsetTop
public int getOffsetTop() -
getOffsetLeft
public int getOffsetLeft() -
getOffsetWidth
public int getOffsetWidth() -
getOffsetHeight
public int getOffsetHeight() -
getParentStyle
- Specified by:
getParentStyle
in interfaceCSS2PropertiesContext
-
getDocumentBaseURI
- Specified by:
getDocumentBaseURI
in interfaceCSS2PropertiesContext
-
toString
- Overrides:
toString
in classElementImpl
-