Class AbstractContainer
- java.lang.Object
-
- org.apache.batik.dom.AbstractNode
-
- org.apache.batik.dom.AbstractParentNode
-
- org.apache.batik.dom.AbstractParentChildNode
-
- org.apache.batik.dom.AbstractElement
-
- org.apache.batik.dom.AbstractElementNS
-
- org.apache.batik.dom.GenericElementNS
-
- net.sourceforge.jeuclid.elements.AbstractJEuclidElement
-
- net.sourceforge.jeuclid.elements.presentation.AbstractContainer
-
- All Implemented Interfaces:
java.io.Serializable,JEuclidElement,JEuclidNode,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.w3c.dom.ElementTraversal,org.w3c.dom.Element,org.w3c.dom.events.EventTarget,MathMLContainer,MathMLElement,MathMLPresentationContainer,MathMLPresentationElement,org.w3c.dom.Node
- Direct Known Subclasses:
AbstractElementWithDelegates,AbstractTableElement,MathImpl,Merror,Mpadded,Mphantom,Mrow,Mstyle,Semantics
public abstract class AbstractContainer extends AbstractJEuclidElement implements MathMLPresentationContainer
Abstract implementation for all classes that provide support for the DOM MathMLContainer interface.- Version:
- $Revision: bc1d5fde7b73 $
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class net.sourceforge.jeuclid.elements.AbstractJEuclidElement
ATTR_CLASS, ATTR_DEPRECATED_BACKGROUND, ATTR_DEPRECATED_COLOR, ATTR_DEPRECATED_FONTFAMILY, ATTR_DEPRECATED_FONTSIZE, ATTR_DEPRECATED_FONTSTYLE, ATTR_DEPRECATED_FONTWEIGHT, ATTR_HREF, ATTR_ID, ATTR_MATHBACKGROUND, ATTR_MATHCOLOR, ATTR_MATHSIZE, ATTR_MATHVARIANT, ATTR_STYLE, ATTR_XREF, TRIVIAL_SPACE_MAX, URI
-
Fields inherited from class org.apache.batik.dom.AbstractParentChildNode
nextSibling, parentNode, previousSibling
-
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 AbstractContainer(java.lang.String qname, org.apache.batik.dom.AbstractDocument odoc)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteArgument(int index)This method deletes the index-th child element that is an argument of this element.voiddeleteDeclaration(int index)This method deletes the MathMLDeclareElement representing the index-th declare child element of this element.MathMLElementgetArgument(int index)This method returns the indexth child argument element of this element.MathMLNodeListgetArguments()This attribute accesses the child MathMLElements of this element which are arguments of it, as a MathMLNodeList.MathMLDeclareElementgetDeclaration(int index)This method retrieves the index-th child declare element of this element.MathMLNodeListgetDeclarations()Provides access to the declare elements which are children of this element, in a MathMLNodeList.intgetNArguments()The number of child elements of this element which represent arguments of the element, as opposed to qualifiers or declare elements.MathMLElementinsertArgument(MathMLElement newArgument, int index)This method inserts newArgument before the current index-th argument of this element.MathMLDeclareElementinsertDeclaration(MathMLDeclareElement newDeclaration, int index)This method inserts newDeclaration before the current index-th child declare element of this element.MathMLElementremoveArgument(int index)This method deletes the index-th child element that is an argument of this element, and returns it to the caller.MathMLDeclareElementremoveDeclaration(int index)This method removes the MathMLDeclareElement representing the index-th declare child element of this element, and returns it to the caller.MathMLElementsetArgument(MathMLElement newArgument, int index)This method sets newArgument as the index-th argument of this element.MathMLDeclareElementsetDeclaration(MathMLDeclareElement newDeclaration, int index)This method inserts newDeclaration as the index-th child declaration of this element.-
Methods inherited from class net.sourceforge.jeuclid.elements.AbstractJEuclidElement
addMathElement, applyLocalAttributesToContext, changeHook, dispatchEvent, getChildLayoutContext, getChildrenToDraw, getChildrenToLayout, getClassName, getContents, getFont, getFontMetrics, getHref, getId, getIndexOfMathElement, getMathAttribute, getMathAttribute, getMathbackground, getMathcolor, getMathElement, getMathElementCount, getMathElementStyle, getMathsize, getMathvariant, getMathvariantAsVariant, getMiddleShift, getOwnerMathElement, getParent, getText, getXref, hasChildPostscripts, hasChildPrescripts, layoutStage1, layoutStage2, layoutStageInvariant, setClassName, setDefaultMathAttribute, setFakeParent, setHref, setId, setMathbackground, setMathcolor, setMathElement, setMathElementStyle, setMathsize, setMathvariant, setXref
-
Methods inherited from class org.apache.batik.dom.GenericElementNS
copyInto, deepCopyInto, deepExport, export, getNodeName, isReadonly, newNode, setNodeName, setReadonly
-
Methods inherited from class org.apache.batik.dom.AbstractElement
attrAdded, attrModified, attrRemoved, checkChildType, createAttributes, fireDOMAttrModifiedEvent, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getChildElementCount, getFirstElementChild, getIdAttribute, getLastElementChild, getNextElementSibling, getNodeType, getPreviousElementSibling, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, hasAttributes, nodeAdded, nodeToBeRemoved, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
-
Methods inherited from class org.apache.batik.dom.AbstractParentChildNode
getNextSibling, getParentNode, getPreviousSibling, setNextSibling, setParentNode, setPreviousSibling
-
Methods inherited from class org.apache.batik.dom.AbstractParentNode
appendChild, checkAndRemove, fireDOMNodeInsertedEvent, fireDOMNodeInsertedIntoDocumentEvent, fireDOMNodeRemovedEvent, fireDOMNodeRemovedFromDocumentEvent, fireDOMSubtreeModifiedEvent, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getLastChild, getTextContent, hasChildNodes, insertBefore, removeChild, replaceChild
-
Methods inherited from class org.apache.batik.dom.AbstractNode
addEventListener, addEventListenerNS, cloneNode, compareDocumentPosition, compareNamedNodeMaps, compareStrings, createDOMException, fireDOMCharacterDataModifiedEvent, fireUserDataHandlers, getBaseURI, getBaseURI, getCascadedXMLBase, getCurrentDocument, getEventSupport, getFeature, getLocalName, getManagerData, getNodeValue, getOwnerDocument, getParentNodeEventTarget, getPrefix, getUserData, getXblBoundElement, getXblChildNodes, getXblDefinitions, getXblFirstChild, getXblFirstElementChild, getXblLastChild, getXblLastElementChild, getXblNextElementSibling, getXblNextSibling, getXblParentNode, getXblPreviousElementSibling, getXblPreviousSibling, getXblScopedChildNodes, getXblShadowTree, hasEventListenerNS, initializeEventSupport, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespacePrefix, lookupNamespaceURI, lookupPrefix, removeEventListener, removeEventListenerNS, setManagerData, setNodeValue, setOwnerDocument, setPrefix, setSpecified, setTextContent, 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.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.mathml.MathMLElement
getClassName, getHref, getId, getMathElementStyle, getOwnerMathElement, getXref, setClassName, setHref, setId, setMathElementStyle, setXref
-
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
-
-
-
-
Method Detail
-
getNArguments
public int getNArguments()
The number of child elements of this element which represent arguments of the element, as opposed to qualifiers or declare elements. Thus for a MathMLContentContainer it does not contain elements representing bound variables, conditions, separators, degrees, or upper or lower limits (bvar, condition, sep, degree, lowlimit, or uplimit).- Specified by:
getNArgumentsin interfaceMathMLContainer- Returns:
- value of the nArguments attribute.
-
getArguments
public MathMLNodeList getArguments()
This attribute accesses the child MathMLElements of this element which are arguments of it, as a MathMLNodeList. Note that this list does not contain any MathMLElements representing qualifier elements or declare elements.- Specified by:
getArgumentsin interfaceMathMLContainer- Returns:
- value of the arguments attribute.
-
getDeclarations
public MathMLNodeList getDeclarations()
Provides access to the declare elements which are children of this element, in a MathMLNodeList. All Nodes in this list must be MathMLDeclareElements.- Specified by:
getDeclarationsin interfaceMathMLContainer- Returns:
- value of the declarations attribute.
-
getArgument
public MathMLElement getArgument(int index)
This method returns the indexth child argument element of this element. This frequently differs from the value of Node::childNodes().item(index), as qualifier elements and declare elements are not counted.- Specified by:
getArgumentin interfaceMathMLContainer- Parameters:
index- The one-based index of the argument to be retrieved.- Returns:
- A MathMLElement representing the index-th argument of this element.
-
setArgument
public MathMLElement setArgument(MathMLElement newArgument, int index)
This method sets newArgument as the index-th argument of this element. If there is currently an index-th argument, it is replaced by newArgument. This frequently differs from setting the node at Node::childNodes().item(index), as qualifier elements and declare elements are not counted.- Specified by:
setArgumentin interfaceMathMLContainer- Parameters:
newArgument- A MathMLElement representing the element that is to be set as the index-th argument of this element.index- The index of the argument that is to be set to newArgument. The first argument is numbered 1. If index is one more than the current number of arguments, a new argument is appended.- Returns:
- The MathMLElement child of this element that represents the new argument in the DOM.
-
insertArgument
public MathMLElement insertArgument(MathMLElement newArgument, int index)
This method inserts newArgument before the current index-th argument of this element. If index is 0, or if index is one more than the current number of arguments, newArgument is appended as the last argument. This frequently differs from setting the node at Node::childNodes().item(index), as qualifier elements and declare elements are not counted.- Specified by:
insertArgumentin interfaceMathMLContainer- Parameters:
newArgument- A MathMLElement representing the element that is to be inserted as a child argument of this element.index- The one-based index of the position before which newArgument is to be inserted. The first argument is numbered 1.- Returns:
- The MathMLElement child of this element that represents the new argument in the DOM.
-
deleteArgument
public void deleteArgument(int index)
This method deletes the index-th child element that is an argument of this element. Note that child elements which are qualifier elements or declare elements are not counted in determining the index-th argument.- Specified by:
deleteArgumentin interfaceMathMLContainer- Parameters:
index- The one-based index of the argument to be deleted.
-
removeArgument
public MathMLElement removeArgument(int index)
This method deletes the index-th child element that is an argument of this element, and returns it to the caller. Note that child elements that are qualifier elements or declare elements are not counted in determining the index-th argument.- Specified by:
removeArgumentin interfaceMathMLContainer- Parameters:
index- The one-based index of the argument to be removed.- Returns:
- A MathMLElement representing the argument being removed.
-
getDeclaration
public MathMLDeclareElement getDeclaration(int index)
This method retrieves the index-th child declare element of this element.- Specified by:
getDeclarationin interfaceMathMLContainer- Parameters:
index- A one-based index into the list of child declare elements of this element giving the position of the declare element to be retrieved.- Returns:
- The MathMLDeclareElement representing the index-th child declare.
-
setDeclaration
public MathMLDeclareElement setDeclaration(MathMLDeclareElement newDeclaration, int index)
This method inserts newDeclaration as the index-th child declaration of this element. If there is already an index-th declare child element, it is replaced by newDeclaration.- Specified by:
setDeclarationin interfaceMathMLContainer- Parameters:
newDeclaration- A MathMLDeclareElement to be inserted as the index-th child declare element.index- A one-based index into the list of child declare elements of this element giving the position into which newDeclaration is to be inserted. If index is one more than the number of declare children of this element, newDeclaration is appended as the last declare child.- Returns:
- The MathMLDeclareElement being inserted.
-
insertDeclaration
public MathMLDeclareElement insertDeclaration(MathMLDeclareElement newDeclaration, int index)
This method inserts newDeclaration before the current index-th child declare element of this element. If index is 0, newDeclaration is appended as the last child declare element.- Specified by:
insertDeclarationin interfaceMathMLContainer- Parameters:
newDeclaration- A MathMLDeclareElement to be inserted as the index-th child declare element.index- A one-based index into the list of child declare elements of this element giving the position before which newDeclaration is to be inserted. If index is 0 or if it is one more than the number of child declare children, newDeclaration is appended as the last child declare element.- Returns:
- The MathMLDeclareElement child of this element representing newDeclaration in the DOM.
-
removeDeclaration
public MathMLDeclareElement removeDeclaration(int index)
This method removes the MathMLDeclareElement representing the index-th declare child element of this element, and returns it to the caller. Note that index is the position in the list of declare element children, as opposed to the position in the list of all child Nodes.- Specified by:
removeDeclarationin interfaceMathMLContainer- Parameters:
index- The one-based index of the declare element to be removed.- Returns:
- The MathMLDeclareElement being removed as a child Node of this element.
-
deleteDeclaration
public void deleteDeclaration(int index)
This method deletes the MathMLDeclareElement representing the index-th declare child element of this element. Note that index is the position in the list of declare element children, as opposed to the position in the list of all child Nodes.- Specified by:
deleteDeclarationin interfaceMathMLContainer- Parameters:
index- The one-based index of the declare element to be removed.
-
-