Class DocumentElement

  • All Implemented Interfaces:
    java.io.Serializable, JEuclidNode, LayoutableDocument, LayoutableNode, org.apache.batik.dom.events.NodeEventTarget, org.apache.batik.dom.ExtendedNode, org.apache.batik.dom.xbl.NodeXBL, org.apache.batik.dom.xbl.XBLManagerData, org.apache.batik.i18n.Localizable, org.w3c.dom.Document, org.w3c.dom.events.DocumentEvent, org.w3c.dom.events.EventTarget, MathMLDocument, org.w3c.dom.Node, org.w3c.dom.traversal.DocumentTraversal, org.w3c.dom.views.DocumentView, org.w3c.dom.xpath.XPathEvaluator

    public final class DocumentElement
    extends org.apache.batik.dom.GenericDocument
    implements MathMLDocument, JEuclidNode, org.w3c.dom.views.DocumentView, LayoutableDocument
    Class for MathML Document Nodes.
    Version:
    $Revision: 92569cce5dd6 $
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.batik.dom.AbstractDocument

        org.apache.batik.dom.AbstractDocument.DocumentConfiguration, org.apache.batik.dom.AbstractDocument.DocumentError, org.apache.batik.dom.AbstractDocument.IdSoftRef, org.apache.batik.dom.AbstractDocument.XPathExpr, org.apache.batik.dom.AbstractDocument.XPathNodeNSResolver
      • Nested classes/interfaces inherited from class org.apache.batik.dom.AbstractParentNode

        org.apache.batik.dom.AbstractParentNode.ChildNodes, org.apache.batik.dom.AbstractParentNode.ElementsByTagName, org.apache.batik.dom.AbstractParentNode.ElementsByTagNameNS
    • Field Summary

      • Fields inherited from class org.apache.batik.dom.GenericDocument

        ATTR_ID, readonly
      • Fields inherited from class org.apache.batik.dom.AbstractDocument

        documentEventSupport, documentURI, domConfig, elementsById, elementsByTagNames, elementsByTagNamesNS, eventsEnabled, implementation, inputEncoding, localizableSupport, RESOURCES, strictErrorChecking, traversalSupport, xblManager, xmlEncoding, xmlStandalone, xmlVersion
      • Fields inherited from class org.apache.batik.dom.AbstractParentNode

        childNodes
      • Fields inherited from class org.apache.batik.dom.AbstractNode

        DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, EMPTY_NODE_LIST, eventSupport, managerData, ownerDocument, userData, userDataHandlers
      • 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 
      Constructor Description
      DocumentElement()
      Creates a math element.
      DocumentElement​(org.w3c.dom.DocumentType doctype)
      Creates a MathML compatible document with the given DocumentType.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.w3c.dom.Element createElement​(java.lang.String tagName)
      org.w3c.dom.Element createElementNS​(java.lang.String namespaceURI, java.lang.String qualifiedName)
      LayoutContext getChildLayoutContext​(int childNum, LayoutContext context)
      get the layout context for the given child.
      java.util.List<LayoutableNode> getChildrenToDraw()
      java.util.List<LayoutableNode> getChildrenToLayout()
      JEuclidView getDefaultView()
      java.lang.String getDomain()
      The domain name of the server that served the document, or null if the server cannot be identified by a domain name, or if it is not available.
      java.lang.String getReferrer()
      The URI of the page that linked to this document, if available.
      java.lang.String getURI()
      The complete URI of this document.
      void layoutStage1​(LayoutView view, LayoutInfo info, LayoutStage childMinStage, LayoutContext context)
      context insensitive layout.
      void layoutStage2​(LayoutView view, LayoutInfo info, LayoutContext context)
      context sensitive layout.
      protected org.w3c.dom.Node newNode()
      • Methods inherited from class org.apache.batik.dom.GenericDocument

        createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createEntityReference, createProcessingInstruction, createTextNode, isId, isReadonly, setReadonly
      • Methods inherited from class org.apache.batik.dom.AbstractDocument

        addIdEntry, adoptNode, adoptNode1, canDispatch, checkChars, checkChildType, checkName, cloneNode, copyInto, createDOMError, createEvent, createExpression, createNodeIterator, createNSResolver, createTreeWalker, createXPathException, deepCopyInto, deepExport, detachNodeIterator, evaluate, export, formatMessage, getChildElementById, getCurrentDocument, getDoctype, getDocumentElement, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getEventsEnabled, getImplementation, getInputEncoding, getLocale, getNodeName, getNodeType, getRoot, getStrictErrorChecking, getXblBoundElement, getXblChildNodes, getXblDefinitions, getXblFirstChild, getXblFirstElementChild, getXblLastChild, getXblLastElementChild, getXBLManager, getXblNextElementSibling, getXblNextSibling, getXblParentNode, getXblPreviousElementSibling, getXblPreviousSibling, getXblScopedChildNodes, getXblShadowTree, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, importNode, nodeToBeRemoved, normalizeDocument, normalizeDocument, putElementsByTagName, putElementsByTagNameNS, removeIdEntry, renameNode, setDoctype, setDocumentInputEncoding, setDocumentURI, setDocumentXmlEncoding, setEventsEnabled, setLocale, setStrictErrorChecking, setTextContent, setXBLManager, setXmlStandalone, setXmlVersion, splitCdata, updateIdEntry
      • Methods inherited from class org.apache.batik.dom.AbstractParentNode

        appendChild, checkAndRemove, deepExport, fireDOMNodeInsertedEvent, fireDOMNodeInsertedIntoDocumentEvent, fireDOMNodeRemovedEvent, fireDOMNodeRemovedFromDocumentEvent, fireDOMSubtreeModifiedEvent, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getLastChild, getTextContent, hasChildNodes, insertBefore, nodeAdded, normalize, removeChild, replaceChild
      • Methods inherited from class org.apache.batik.dom.AbstractNode

        addEventListener, addEventListenerNS, compareDocumentPosition, compareNamedNodeMaps, compareStrings, createDOMException, dispatchEvent, export, fireDOMCharacterDataModifiedEvent, fireUserDataHandlers, getAttributes, getBaseURI, getBaseURI, getCascadedXMLBase, getEventSupport, getFeature, getLocalName, getManagerData, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getParentNodeEventTarget, getPrefix, getPreviousSibling, getUserData, hasAttributes, hasEventListenerNS, initializeEventSupport, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespacePrefix, lookupNamespaceURI, lookupPrefix, removeEventListener, removeEventListenerNS, setManagerData, setNextSibling, setNodeName, setNodeValue, setOwnerDocument, setParentNode, setPrefix, setPreviousSibling, setSpecified, setUserData, willTriggerNS
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.w3c.dom.Document

        adoptNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getDocumentElement, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, getInputEncoding, getStrictErrorChecking, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, normalizeDocument, renameNode, setDocumentURI, setStrictErrorChecking, setXmlStandalone, setXmlVersion
      • 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

      • DocumentElement

        public DocumentElement()
        Creates a math element.
      • DocumentElement

        public DocumentElement​(org.w3c.dom.DocumentType doctype)
        Creates a MathML compatible document with the given DocumentType.
        Parameters:
        doctype - DocumentType to use. This is currently ignored.
    • Method Detail

      • getDomain

        public java.lang.String getDomain()
        The domain name of the server that served the document, or null if the server cannot be identified by a domain name, or if it is not available. If this is not a stand-alone MathML document (e.g. is embedded in an XHTML document), this may be retrieved from the parent Document if available.
        Specified by:
        getDomain in interface MathMLDocument
        Returns:
        value of the domain attribute.
      • getReferrer

        public java.lang.String getReferrer()
        The URI of the page that linked to this document, if available. This is null if the user navigated directly to the page. If this is not a stand-alone MathML document (e.g. is embedded in an XHTML document), this may be retrieved from the parent Document if available.
        Specified by:
        getReferrer in interface MathMLDocument
        Returns:
        value of the referrer attribute.
      • getURI

        public java.lang.String getURI()
        The complete URI of this document. This is null if this is not a stand-alone MathML document.
        Specified by:
        getURI in interface MathMLDocument
        Returns:
        value of the URI attribute.
      • getChildLayoutContext

        public LayoutContext getChildLayoutContext​(int childNum,
                                                   LayoutContext context)
        get the layout context for the given child.
        Specified by:
        getChildLayoutContext in interface JEuclidNode
        Parameters:
        childNum - 0-based number of the child to check.
        context - external context.
        Returns:
        layout context to use.
      • getDefaultView

        public JEuclidView getDefaultView()
        Specified by:
        getDefaultView in interface org.w3c.dom.views.DocumentView
      • layoutStage1

        public void layoutStage1​(LayoutView view,
                                 LayoutInfo info,
                                 LayoutStage childMinStage,
                                 LayoutContext context)
        context insensitive layout.
        Specified by:
        layoutStage1 in interface LayoutableNode
        Parameters:
        view - LayoutView to use.
        info - LayoutInfo to manipulate.
        childMinStage - minimum stage of children. Either STAGE1 or STAGE2.
        context - LayoutContext for this element.
      • layoutStage2

        public void layoutStage2​(LayoutView view,
                                 LayoutInfo info,
                                 LayoutContext context)
        context sensitive layout.
        Specified by:
        layoutStage2 in interface LayoutableNode
        Parameters:
        view - LayoutView to use.
        info - LayoutInfo to manipulate.
        context - LayoutContext for this element.
      • newNode

        protected org.w3c.dom.Node newNode()
        Overrides:
        newNode in class org.apache.batik.dom.GenericDocument
      • createElement

        public org.w3c.dom.Element createElement​(java.lang.String tagName)
        Specified by:
        createElement in interface org.w3c.dom.Document
        Overrides:
        createElement in class org.apache.batik.dom.GenericDocument
      • createElementNS

        public org.w3c.dom.Element createElementNS​(java.lang.String namespaceURI,
                                                   java.lang.String qualifiedName)
        Specified by:
        createElementNS in interface org.w3c.dom.Document
        Overrides:
        createElementNS in class org.apache.batik.dom.GenericDocument