org.lobobrowser.html.domimpl
public class HTMLElementImpl extends ElementImpl implements HTMLElement, CSS2PropertiesContext
attributes
document, logger, nodeList, notificationsSuspended, parentNode, treeLock, uiNode
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 and Description |
---|
HTMLElementImpl(java.lang.String name) |
HTMLElementImpl(java.lang.String name,
boolean noStyleSheet) |
Modifier and Type | Method and Description |
---|---|
protected AbstractCSS2Properties |
addStyleSheetDeclarations(AbstractCSS2Properties style,
java.util.Set pseudoNames)
Adds style sheet declarations applicable
to this element.
|
protected void |
appendOuterHTMLImpl(java.lang.StringBuffer buffer) |
protected void |
assignAttributeField(java.lang.String normalName,
java.lang.String value) |
protected AbstractCSS2Properties |
createDefaultStyleSheet() |
protected RenderState |
createRenderState(RenderState prevRenderState) |
protected java.util.Collection |
findStyleDeclarations(java.lang.String elementName,
java.lang.String id,
java.lang.String className,
java.util.Set pseudoNames) |
protected void |
forgetLocalStyle() |
protected void |
forgetStyle(boolean deep) |
HTMLElementImpl |
getAncestor(java.lang.String elementTL) |
protected java.lang.Object |
getAncestorForJavaClass(java.lang.Class javaClass) |
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.
|
HTMLElementImpl |
getAncestorWithId(java.lang.String elementTL,
java.lang.String idTL) |
boolean |
getAttributeAsBoolean(java.lang.String name) |
protected int |
getAttributeAsInt(java.lang.String name,
int defaultValue) |
java.lang.String |
getCharset() |
java.lang.String |
getClassName()
The class attribute of the element.
|
AbstractCSS2Properties |
getComputedStyle(java.lang.String pseudoElement) |
protected InputSource |
getCssInputSourceForDecl(java.lang.String text) |
AbstractCSS2Properties |
getCurrentStyle()
Gets the style object associated with the element.
|
java.lang.String |
getDocumentBaseURI() |
protected FormInput[] |
getFormInputs()
Gets form input due to the current element.
|
int |
getOffsetHeight() |
int |
getOffsetLeft() |
int |
getOffsetTop() |
int |
getOffsetWidth() |
java.lang.String |
getOuterHTML() |
HTMLElementImpl |
getParent(java.lang.String elementTL) |
AbstractCSS2Properties |
getParentStyle() |
HTMLElementImpl |
getParentWithClass(java.lang.String elementTL,
java.lang.String classTL) |
HTMLElementImpl |
getParentWithId(java.lang.String elementTL,
java.lang.String idTL) |
HTMLElementImpl |
getPreceedingSibling(java.lang.String elementTL) |
HTMLElementImpl |
getPreceedingSiblingElement() |
HTMLElementImpl |
getPreceedingSiblingWithClass(java.lang.String elementTL,
java.lang.String classTL) |
HTMLElementImpl |
getPreceedingSiblingWithId(java.lang.String elementTL,
java.lang.String idTL) |
java.util.Set |
getPseudoNames()
Gets the pseudo-element lowercase names currently
applicable to this element.
|
AbstractCSS2Properties |
getStyle()
Gets the local style object associated with the element.
|
void |
informInvalid() |
void |
informInvalidAttibute(java.lang.String normalName) |
void |
setCharset(java.lang.String charset) |
void |
setClassName(java.lang.String className)
The class attribute of the element.
|
void |
setCurrentStyle(java.lang.Object value) |
void |
setInnerHTML(java.lang.String newHtml) |
void |
setMouseOver(boolean mouseOver) |
void |
setStyle(java.lang.Object value) |
java.lang.String |
toString() |
void |
warn(java.lang.String message) |
void |
warn(java.lang.String message,
java.lang.Throwable err) |
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
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
getScriptable, setScriptable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDir, getId, getLang, getTitle, setDir, setId, setLang, setTitle
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
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
informLayoutInvalid, informLookInvalid, informPositionInvalid, informSizeInvalid
public HTMLElementImpl(java.lang.String name, boolean noStyleSheet)
public HTMLElementImpl(java.lang.String name)
protected final void forgetLocalStyle()
protected final void forgetStyle(boolean deep)
public AbstractCSS2Properties getCurrentStyle()
public AbstractCSS2Properties getStyle()
protected AbstractCSS2Properties createDefaultStyleSheet()
public AbstractCSS2Properties getComputedStyle(java.lang.String pseudoElement)
public void setStyle(java.lang.Object value)
public void setCurrentStyle(java.lang.Object value)
public java.lang.String getClassName()
HTMLElement
getClassName
in interface HTMLElement
public void setClassName(java.lang.String className)
HTMLElement
setClassName
in interface HTMLElement
public java.lang.String getCharset()
public void setCharset(java.lang.String charset)
public void warn(java.lang.String message, java.lang.Throwable err)
protected int getAttributeAsInt(java.lang.String name, int defaultValue)
public boolean getAttributeAsBoolean(java.lang.String name)
protected void assignAttributeField(java.lang.String normalName, java.lang.String value)
assignAttributeField
in class ElementImpl
protected final InputSource getCssInputSourceForDecl(java.lang.String text)
protected final AbstractCSS2Properties addStyleSheetDeclarations(AbstractCSS2Properties style, java.util.Set pseudoNames)
null
.style
- public void setMouseOver(boolean mouseOver)
public java.util.Set getPseudoNames()
null
if there are no such
pseudo-elements.protected final java.util.Collection findStyleDeclarations(java.lang.String elementName, java.lang.String id, java.lang.String className, java.util.Set pseudoNames)
public void informInvalid()
informInvalid
in interface CSS2PropertiesContext
informInvalid
in class NodeImpl
public void informInvalidAttibute(java.lang.String normalName)
protected FormInput[] getFormInputs()
null
except when the element is a form input element.public HTMLElementImpl getAncestorWithClass(java.lang.String elementTL, java.lang.String classTL)
elementTL
- An tag name in lowercase or an asterisk (*).classTL
- A class name in lowercase.public HTMLElementImpl getParentWithClass(java.lang.String elementTL, java.lang.String classTL)
public HTMLElementImpl getPreceedingSiblingElement()
public HTMLElementImpl getPreceedingSiblingWithClass(java.lang.String elementTL, java.lang.String classTL)
public HTMLElementImpl getAncestorWithId(java.lang.String elementTL, java.lang.String idTL)
public HTMLElementImpl getParentWithId(java.lang.String elementTL, java.lang.String idTL)
public HTMLElementImpl getPreceedingSiblingWithId(java.lang.String elementTL, java.lang.String idTL)
public HTMLElementImpl getAncestor(java.lang.String elementTL)
public HTMLElementImpl getParent(java.lang.String elementTL)
public HTMLElementImpl getPreceedingSibling(java.lang.String elementTL)
protected java.lang.Object getAncestorForJavaClass(java.lang.Class javaClass)
public void setInnerHTML(java.lang.String newHtml)
public java.lang.String getOuterHTML()
protected void appendOuterHTMLImpl(java.lang.StringBuffer buffer)
protected RenderState createRenderState(RenderState prevRenderState)
createRenderState
in class NodeImpl
public int getOffsetTop()
public int getOffsetLeft()
public int getOffsetWidth()
public int getOffsetHeight()
public AbstractCSS2Properties getParentStyle()
getParentStyle
in interface CSS2PropertiesContext
public java.lang.String getDocumentBaseURI()
getDocumentBaseURI
in interface CSS2PropertiesContext
public java.lang.String toString()
toString
in class ElementImpl