net.sourceforge.jeuclid.elements.generic
Class DocumentElement

java.lang.Object
  extended by org.apache.batik.dom.AbstractNode
      extended by org.apache.batik.dom.AbstractParentNode
          extended by org.apache.batik.dom.AbstractDocument
              extended by org.apache.batik.dom.GenericDocument
                  extended by net.sourceforge.jeuclid.elements.generic.DocumentElement
All Implemented Interfaces:
Serializable, JEuclidNode, LayoutableDocument, LayoutableNode, NodeEventTarget, ExtendedNode, NodeXBL, XBLManagerData, Localizable, Document, DocumentEvent, EventTarget, MathMLDocument, Node, org.w3c.dom.traversal.DocumentTraversal, org.w3c.dom.views.DocumentView, org.w3c.dom.xpath.XPathEvaluator

public final class DocumentElement
extends GenericDocument
implements MathMLDocument, JEuclidNode, org.w3c.dom.views.DocumentView, LayoutableDocument

Class for MathML Document Nodes.

Version:
$Revision: 371548310efa $
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.batik.dom.AbstractDocument
AbstractDocument.DocumentConfiguration, AbstractDocument.DocumentError, AbstractDocument.IdSoftRef, AbstractDocument.XPathExpr, AbstractDocument.XPathNodeNSResolver
 
Nested classes/interfaces inherited from class org.apache.batik.dom.AbstractParentNode
AbstractParentNode.ChildNodes, AbstractParentNode.ElementsByTagName, 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
DocumentElement()
          Creates a math element.
DocumentElement(DocumentType doctype)
          Creates a MathML compatible document with the given DocumentType.
 
Method Summary
 Element createElement(String tagName)
          
 Element createElementNS(String namespaceURI, String qualifiedName)
          
 LayoutContext getChildLayoutContext(int childNum, LayoutContext context)
          get the layout context for the given child.
 List<LayoutableNode> getChildrenToDraw()
          
 List<LayoutableNode> getChildrenToLayout()
          
 JEuclidView getDefaultView()
          
 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.
 String getReferrer()
          The URI of the page that linked to this document, if available.
 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  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(DocumentType doctype)
Creates a MathML compatible document with the given DocumentType.

Parameters:
doctype - DocumentType to use. This is currently ignored.
Method Detail

getDomain

public 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 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 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

getChildrenToLayout

public List<LayoutableNode> getChildrenToLayout()

Specified by:
getChildrenToLayout in interface LayoutableNode
Returns:
List of children to Layout. Normally, all children.

getChildrenToDraw

public List<LayoutableNode> getChildrenToDraw()

Specified by:
getChildrenToDraw in interface LayoutableNode
Returns:
List of children to Draw. Normally, all children.

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 Node newNode()

Overrides:
newNode in class GenericDocument

createElement

public Element createElement(String tagName)

Specified by:
createElement in interface Document
Overrides:
createElement in class GenericDocument

createElementNS

public Element createElementNS(String namespaceURI,
                               String qualifiedName)

Specified by:
createElementNS in interface Document
Overrides:
createElementNS in class GenericDocument


Copyright © 2002-2010 The JEuclid project. All Rights Reserved.