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, org.w3c.dom.Element, HTMLElement, org.w3c.dom.Node
- Direct Known Subclasses:
- HTMLAbstractUIElement, HTMLBaseElementImpl, HTMLBRElementImpl, HTMLFrameElementImpl, HTMLFrameSetElementImpl, HTMLHtmlElementImpl, HTMLNonStandardElement, HTMLOptionElementImpl, HTMLScriptElementImpl, HTMLStyleElementImpl, HTMLTableRowElementImpl, HTMLTitleElementImpl
public class HTMLElementImpl
- extends ElementImpl
- implements HTMLElement, CSS2PropertiesContext
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 |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 |
HTMLElementImpl
public HTMLElementImpl(java.lang.String name,
boolean noStyleSheet)
HTMLElementImpl
public HTMLElementImpl(java.lang.String name)
forgetLocalStyle
protected final void forgetLocalStyle()
forgetStyle
protected final void forgetStyle(boolean deep)
getCurrentStyle
public AbstractCSS2Properties getCurrentStyle()
- Gets the style object associated with the element.
It may return null only if the type of element does not handle stylesheets.
getStyle
public AbstractCSS2Properties 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.
getComputedStyle
public AbstractCSS2Properties getComputedStyle(java.lang.String pseudoElement)
setStyle
public void setStyle(java.lang.Object value)
setCurrentStyle
public void setCurrentStyle(java.lang.Object value)
getClassName
public java.lang.String 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 interface HTMLElement
setClassName
public void setClassName(java.lang.String className)
- 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 interface HTMLElement
getCharset
public java.lang.String getCharset()
setCharset
public void setCharset(java.lang.String charset)
warn
public void warn(java.lang.String message,
java.lang.Throwable err)
- Specified by:
warn
in interface ModelNode
- Overrides:
warn
in class NodeImpl
warn
public void warn(java.lang.String message)
- Overrides:
warn
in class NodeImpl
getAttributeAsInt
protected int getAttributeAsInt(java.lang.String name,
int defaultValue)
getAttributeAsBoolean
public boolean getAttributeAsBoolean(java.lang.String name)
assignAttributeField
protected void assignAttributeField(java.lang.String normalName,
java.lang.String value)
- Overrides:
assignAttributeField
in class ElementImpl
getCssInputSourceForDecl
protected final InputSource getCssInputSourceForDecl(java.lang.String text)
addStyleSheetDeclarations
protected final AbstractCSS2Properties addStyleSheetDeclarations(AbstractCSS2Properties style,
java.util.Set pseudoNames)
- Adds style sheet declarations applicable
to this element.
A properties object is created if necessary
when the one passed is
null
.
- Parameters:
style
-
setMouseOver
public void setMouseOver(boolean mouseOver)
getPseudoNames
public java.util.Set getPseudoNames()
- Gets the pseudo-element lowercase names currently
applicable to this element. Method must return
null
if there are no such
pseudo-elements.
findStyleDeclarations
protected final java.util.Collection findStyleDeclarations(java.lang.String elementName,
java.lang.String id,
java.lang.String className,
java.util.Set pseudoNames)
informInvalid
public void informInvalid()
- Specified by:
informInvalid
in interface CSS2PropertiesContext
- Overrides:
informInvalid
in class NodeImpl
informInvalidAttibute
public void informInvalidAttibute(java.lang.String normalName)
getFormInputs
protected FormInput[] getFormInputs()
- Gets form input due to the current element. It should
return
null
except when the element is a form input element.
getAncestorWithClass
public HTMLElementImpl getAncestorWithClass(java.lang.String elementTL,
java.lang.String classTL)
- 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.
getAncestorWithId
public HTMLElementImpl getAncestorWithId(java.lang.String elementTL,
java.lang.String idTL)
getAncestor
public HTMLElementImpl getAncestor(java.lang.String elementTL)
getAncestorForJavaClass
protected java.lang.Object getAncestorForJavaClass(java.lang.Class javaClass)
setInnerHTML
public void setInnerHTML(java.lang.String newHtml)
getOuterHTML
public java.lang.String getOuterHTML()
appendOuterHTMLImpl
protected void appendOuterHTMLImpl(java.lang.StringBuffer buffer)
createRenderState
protected RenderState createRenderState(RenderState prevRenderState)
- Overrides:
createRenderState
in class NodeImpl
getOffsetTop
public int getOffsetTop()
getOffsetLeft
public int getOffsetLeft()
getOffsetWidth
public int getOffsetWidth()
getOffsetHeight
public int getOffsetHeight()
getParentStyle
public AbstractCSS2Properties getParentStyle()
- Specified by:
getParentStyle
in interface CSS2PropertiesContext
getDocumentBaseURI
public java.lang.String getDocumentBaseURI()
- Specified by:
getDocumentBaseURI
in interface CSS2PropertiesContext
toString
public java.lang.String toString()
- Overrides:
toString
in class ElementImpl