org.enhydra.xml.xhtml.dom.xerces
Class XHTMLElementImpl

java.lang.Object
  |
  +--org.enhydra.apache.xerces.dom.NodeImpl
        |
        +--org.enhydra.apache.xerces.dom.ChildNode
              |
              +--org.enhydra.apache.xerces.dom.ParentNode
                    |
                    +--org.enhydra.apache.xerces.dom.ElementImpl
                          |
                          +--org.enhydra.apache.xerces.dom.ElementNSImpl
                                |
                                +--org.enhydra.xml.xhtml.dom.xerces.XHTMLElementImpl
All Implemented Interfaces:
Cloneable, Element, EventTarget, HTMLElement, Node, NodeList, Serializable, TypeInfo, XHTMLElement
Direct Known Subclasses:
XHTMLAbbrElementImpl, XHTMLAcronymElementImpl, XHTMLAddressElementImpl, XHTMLAnchorElementImpl, XHTMLAppletElementImpl, XHTMLAreaElementImpl, XHTMLBaseElementImpl, XHTMLBaseFontElementImpl, XHTMLBdoElementImpl, XHTMLBElementImpl, XHTMLBigElementImpl, XHTMLBodyElementImpl, XHTMLBRElementImpl, XHTMLButtonElementImpl, XHTMLCenterElementImpl, XHTMLCiteElementImpl, XHTMLCodeElementImpl, XHTMLDdElementImpl, XHTMLDfnElementImpl, XHTMLDirectoryElementImpl, XHTMLDivElementImpl, XHTMLDListElementImpl, XHTMLDtElementImpl, XHTMLEmElementImpl, XHTMLFieldSetElementImpl, XHTMLFontElementImpl, XHTMLFormElementImpl, XHTMLFrameElementImpl, XHTMLFrameSetElementImpl, XHTMLHeadElementImpl, XHTMLHeadingElementImpl, XHTMLHRElementImpl, XHTMLHtmlElementImpl, XHTMLIElementImpl, XHTMLIFrameElementImpl, XHTMLImageElementImpl, XHTMLInputElementImpl, XHTMLIsIndexElementImpl, XHTMLKbdElementImpl, XHTMLLabelElementImpl, XHTMLLegendElementImpl, XHTMLLIElementImpl, XHTMLLinkElementImpl, XHTMLMapElementImpl, XHTMLMenuElementImpl, XHTMLMetaElementImpl, XHTMLModElementImpl, XHTMLNoframesElementImpl, XHTMLNoscriptElementImpl, XHTMLObjectElementImpl, XHTMLOListElementImpl, XHTMLOptGroupElementImpl, XHTMLOptionElementImpl, XHTMLParagraphElementImpl, XHTMLParamElementImpl, XHTMLPreElementImpl, XHTMLQuoteElementImpl, XHTMLSampElementImpl, XHTMLScriptElementImpl, XHTMLSelectElementImpl, XHTMLSElementImpl, XHTMLSmallElementImpl, XHTMLSpanElementImpl, XHTMLStrikeElementImpl, XHTMLStrongElementImpl, XHTMLStyleElementImpl, XHTMLSubElementImpl, XHTMLSupElementImpl, XHTMLTableCaptionElementImpl, XHTMLTableCellElementImpl, XHTMLTableColElementImpl, XHTMLTableElementImpl, XHTMLTableRowElementImpl, XHTMLTableSectionElementImpl, XHTMLTextAreaElementImpl, XHTMLTitleElementImpl, XHTMLTtElementImpl, XHTMLUElementImpl, XHTMLUListElementImpl, XHTMLVarElementImpl

public class XHTMLElementImpl
extends org.enhydra.apache.xerces.dom.ElementNSImpl
implements XHTMLElement

Implements an HTML-specific element, an Element that will only appear inside HTML documents. This element extends ElementImpl by adding methods for directly manipulating HTML-specific attributes. All HTML elements gain access to the id, title, lang, dir and class attributes. Other elements add their own specific attributes.

Version:
$Revision: 1.8 $ $Date: 2006/12/16 16:58:16 $
See Also:
HTMLElement, Serialized Form

Inner classes inherited from class org.enhydra.apache.xerces.dom.ParentNode
org.enhydra.apache.xerces.dom.ParentNode.UserDataRecord
 
Fields inherited from class org.enhydra.apache.xerces.dom.ElementNSImpl
localName, namespaceURI, serialVersionUID, type, xmlURI
 
Fields inherited from class org.enhydra.apache.xerces.dom.ElementImpl
attributes, name
 
Fields inherited from class org.enhydra.apache.xerces.dom.ParentNode
firstChild, fNodeListCache, ownerDocument
 
Fields inherited from class org.enhydra.apache.xerces.dom.ChildNode
nextSibling, previousSibling
 
Fields inherited from class org.enhydra.apache.xerces.dom.NodeImpl
DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, ID, IGNORABLEWS, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_DISCONNECTED, TREE_POSITION_EQUIVALENT, TREE_POSITION_FOLLOWING, TREE_POSITION_PRECEDING, TREE_POSITION_SAME_NODE
 
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
 
Fields inherited from interface org.w3c.dom.TypeInfo
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION
 
Constructor Summary
(package private) XHTMLElementImpl(XHTMLDocumentBase owner, String namespaceURI, String tagName)
          Constructor required owner document and element tag name.
 
Method Summary
 String getAttribute(String attrName)
           
 Attr getAttributeNode(String attrName)
           
 Attr getAttributeNodeNS(String namespaceURI, String localName)
           
 String getAttributeNS(String namespaceURI, String localName)
           
(package private)  boolean getBinary(String name)
          Convenience method used to translate an attribute value into a boolean value.
 String getClassName()
           
 String getDir()
           
 NodeList getElementsByTagName(String tagName)
           
 NodeList getElementsByTagNameNS(String namespaceURI, String localName)
           
 HTMLFormElement getForm()
          Convenience method returns the form in which this form element is contained.
 String getId()
           
(package private)  int getInteger(String value)
          Convenience method used to translate an attribute value into an integer value.
 String getLang()
           
 String getOnBlur()
           
 String getOnClick()
           
 String getOnDblClick()
           
 String getOnFocus()
           
 String getOnKeyDown()
           
 String getOnKeyPress()
           
 String getOnKeyUp()
           
 String getOnMouseDown()
           
 String getOnMouseMove()
           
 String getOnMouseOut()
           
 String getOnMouseOver()
           
 String getOnMouseUp()
           
 String getStyle()
           
 String getTitle()
           
 String getXmlLang()
          Language code defined in RFC 1766.
(package private)  void setAttribute(String name, boolean value)
          Convenience method used to set a boolean attribute.
(package private)  void setAttribute(String attr, int value)
           
 void setClassName(String className)
           
 void setDir(String dir)
           
 void setId(String id)
           
 void setLang(String lang)
           
 void setOnBlur(String newValue)
           
 void setOnClick(String newValue)
           
 void setOnDblClick(String newValue)
           
 void setOnFocus(String newValue)
           
 void setOnKeyDown(String newValue)
           
 void setOnKeyPress(String newValue)
           
 void setOnKeyUp(String newValue)
           
 void setOnMouseDown(String newValue)
           
 void setOnMouseMove(String newValue)
           
 void setOnMouseOut(String newValue)
           
 void setOnMouseOver(String newValue)
           
 void setOnMouseUp(String newValue)
           
 void setStyle(String newValue)
           
 void setTitle(String title)
           
 void setXmlLang(String xmlLang)
           
 
Methods inherited from class org.enhydra.apache.xerces.dom.ElementNSImpl
getBaseURI, getLocalName, getNamespaceURI, getPrefix, getTypeName, getTypeNamespace, isDerivedFrom, rename, setPrefix, setType, setValues
 
Methods inherited from class org.enhydra.apache.xerces.dom.ElementImpl
cloneNode, getAttributes, getDefaultAttributes, getNodeName, getNodeType, getSchemaTypeInfo, getTagName, getXercesAttribute, hasAttribute, hasAttributeNS, hasAttributes, isEqualNode, moveSpecifiedAttributes, normalize, reconcileDefaultAttributes, removeAttribute, removeAttributeNode, removeAttributeNS, rename, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setOwnerDocument, setReadOnly, setupDefaultAttributes, setXercesAttributeNode, synchronizeData
 
Methods inherited from class org.enhydra.apache.xerces.dom.ParentNode
checkNormalizationAfterInsert, checkNormalizationAfterRemove, getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, getTextContent, hasChildNodes, hasTextContent, insertBefore, internalInsertBefore, internalRemoveChild, item, lastChild, lastChild, ownerDocument, removeChild, replaceChild, setTextContent, synchronizeChildren
 
Methods inherited from class org.enhydra.apache.xerces.dom.ChildNode
getNextSibling, getParentNode, getPreviousSibling, parentNode, previousSibling
 
Methods inherited from class org.enhydra.apache.xerces.dom.NodeImpl
addEventListener, appendChild, changed, changes, compareDocumentPosition, compareTreePosition, dispatchEvent, getContainer, getElementAncestor, getFeature, getNodeNumber, getNodeValue, getReadOnly, getUserData, getUserData, getUserDataRecord, hasStringValue, hasStringValue, internalIsIgnorableWhitespace, isDefaultNamespace, isFirstChild, isFirstChild, isIdAttribute, isIdAttribute, isIgnorableWhitespace, isNormalized, isNormalized, isOwned, isOwned, isReadOnly, isReadOnly, isSameNode, isSpecified, isSpecified, isSupported, lookupNamespacePrefix, lookupNamespaceURI, lookupPrefix, needsSyncChildren, needsSyncChildren, needsSyncData, needsSyncData, removeEventListener, setNodeValue, setUserData, setUserData, toString
 
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
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
 

Constructor Detail

XHTMLElementImpl

XHTMLElementImpl(XHTMLDocumentBase owner,
                 String namespaceURI,
                 String tagName)
Constructor required owner document and element tag name. Will be called by the constructor of specific element types but with a known tag name. Assures that the owner document is an HTML element.
Parameters:
owner - The owner HTML document
tagName - The element's tag name
Method Detail

getId

public String getId()
Specified by:
getId in interface HTMLElement

setId

public void setId(String id)
Specified by:
setId in interface HTMLElement

getTitle

public String getTitle()
Specified by:
getTitle in interface HTMLElement

setTitle

public void setTitle(String title)
Specified by:
setTitle in interface HTMLElement

getLang

public String getLang()
Specified by:
getLang in interface HTMLElement

setLang

public void setLang(String lang)
Specified by:
setLang in interface HTMLElement

setXmlLang

public void setXmlLang(String xmlLang)
Specified by:
setXmlLang in interface XHTMLElement

getXmlLang

public String getXmlLang()
Description copied from interface: XHTMLElement
Language code defined in RFC 1766. See the xml:lang attribute definition in XHTML 1.0.
Specified by:
getXmlLang in interface XHTMLElement

getDir

public String getDir()
Specified by:
getDir in interface HTMLElement

setDir

public void setDir(String dir)
Specified by:
setDir in interface HTMLElement

getClassName

public String getClassName()
Specified by:
getClassName in interface HTMLElement

setClassName

public void setClassName(String className)
Specified by:
setClassName in interface HTMLElement

getInteger

int getInteger(String value)
Convenience method used to translate an attribute value into an integer value. Returns the integer value or zero if the attribute is not a valid numeric string.
Parameters:
value - The value of the attribute
Returns:
The integer value, or zero if not a valid numeric string

setAttribute

void setAttribute(String attr,
                  int value)

getBinary

boolean getBinary(String name)
Convenience method used to translate an attribute value into a boolean value. If the attribute has an associated value (even an empty string), it is set and true is returned. If the attribute does not exist, false is returend.
Parameters:
value - The value of the attribute
Returns:
True or false depending on whether the attribute has been set

setAttribute

void setAttribute(String name,
                  boolean value)
Convenience method used to set a boolean attribute. If the value is true, the attribute is set to an empty string. If the value is false, the attribute is removed. HTML 4.0 understands empty strings as set attributes.
Parameters:
name - The name of the attribute
value - The value of the attribute

getAttributeNode

public Attr getAttributeNode(String attrName)
Specified by:
getAttributeNode in interface Element
Overrides:
getAttributeNode in class org.enhydra.apache.xerces.dom.ElementImpl

getAttributeNodeNS

public Attr getAttributeNodeNS(String namespaceURI,
                               String localName)
Specified by:
getAttributeNodeNS in interface Element
Overrides:
getAttributeNodeNS in class org.enhydra.apache.xerces.dom.ElementImpl

getAttribute

public String getAttribute(String attrName)
Specified by:
getAttribute in interface Element
Overrides:
getAttribute in class org.enhydra.apache.xerces.dom.ElementImpl

getAttributeNS

public String getAttributeNS(String namespaceURI,
                             String localName)
Specified by:
getAttributeNS in interface Element
Overrides:
getAttributeNS in class org.enhydra.apache.xerces.dom.ElementImpl

getElementsByTagName

public final NodeList getElementsByTagName(String tagName)
Specified by:
getElementsByTagName in interface Element
Overrides:
getElementsByTagName in class org.enhydra.apache.xerces.dom.ElementImpl

getElementsByTagNameNS

public final NodeList getElementsByTagNameNS(String namespaceURI,
                                             String localName)
Specified by:
getElementsByTagNameNS in interface Element
Overrides:
getElementsByTagNameNS in class org.enhydra.apache.xerces.dom.ElementImpl

getForm

public HTMLFormElement getForm()
Convenience method returns the form in which this form element is contained. This method is exposed for form elements through the DOM API, but other elements have no access to it through the API.

setOnKeyUp

public void setOnKeyUp(String newValue)

getOnKeyUp

public String getOnKeyUp()

setStyle

public void setStyle(String newValue)

getStyle

public String getStyle()

setOnMouseDown

public void setOnMouseDown(String newValue)

getOnMouseDown

public String getOnMouseDown()

setOnKeyPress

public void setOnKeyPress(String newValue)

getOnKeyPress

public String getOnKeyPress()

setOnDblClick

public void setOnDblClick(String newValue)

getOnDblClick

public String getOnDblClick()

setOnKeyDown

public void setOnKeyDown(String newValue)

getOnKeyDown

public String getOnKeyDown()

setOnMouseMove

public void setOnMouseMove(String newValue)

getOnMouseMove

public String getOnMouseMove()

setOnMouseUp

public void setOnMouseUp(String newValue)

getOnMouseUp

public String getOnMouseUp()

setOnMouseOut

public void setOnMouseOut(String newValue)

getOnMouseOut

public String getOnMouseOut()

setOnClick

public void setOnClick(String newValue)

getOnClick

public String getOnClick()

setOnMouseOver

public void setOnMouseOver(String newValue)

getOnMouseOver

public String getOnMouseOver()

setOnBlur

public void setOnBlur(String newValue)

getOnBlur

public String getOnBlur()

setOnFocus

public void setOnFocus(String newValue)

getOnFocus

public String getOnFocus()


Copyright © 1999-2002 Mark Diekhans, enhydra.org. All Rights reserved.