Package net.sourceforge.jeuclid.elements
Class AbstractJEuclidElement
- 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
-
- 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,MathMLElement,org.w3c.dom.Node
- Direct Known Subclasses:
AbstractContainer,AbstractInvisibleJEuclidElement,AbstractRoot,AbstractScriptElement,AbstractTokenWithTextLayout,AbstractUnderOver,ForeignElement,Mfrac,Mo,Mspace
public abstract class AbstractJEuclidElement extends org.apache.batik.dom.GenericElementNS implements JEuclidElement
The basic class for all math elements. Every element class inherits from this class. It provides basic functionality for drawing.- Version:
- $Revision: 62d8defc665e $
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTR_CLASSConstant for class attribute.static java.lang.StringATTR_DEPRECATED_BACKGROUNDConstant for background attribute.static java.lang.StringATTR_DEPRECATED_COLORConstant for color attribute.static java.lang.StringATTR_DEPRECATED_FONTFAMILYConstant for fontfamily attribute.static java.lang.StringATTR_DEPRECATED_FONTSIZEConstant for fontsize attribute.static java.lang.StringATTR_DEPRECATED_FONTSTYLEConstant for fontstyle attribute.static java.lang.StringATTR_DEPRECATED_FONTWEIGHTConstant for fontweight attribute.static java.lang.StringATTR_HREFConstant for href attribute.static java.lang.StringATTR_IDConstant for id attribute.static java.lang.StringATTR_MATHBACKGROUNDThe mathbackground attribute.static java.lang.StringATTR_MATHCOLORConstant for mathcolor attribute.static java.lang.StringATTR_MATHSIZEConstant for mathsize attribute.static java.lang.StringATTR_MATHVARIANTConstant for mathvariant attribute.static java.lang.StringATTR_STYLEConstant for style attribute.static java.lang.StringATTR_XREFConstant for xref attribute.static intTRIVIAL_SPACE_MAXlargest value for all trivial spaces (= spaces that can be ignored / shortened).static java.lang.StringURIThe URI from MathML.-
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 AbstractJEuclidElement(java.lang.String nsUri, java.lang.String qname, org.apache.batik.dom.AbstractDocument odoc)Constructor to explicitly set the namespace.AbstractJEuclidElement(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 voidaddMathElement(MathMLElement child)Add a math element as a child.LayoutContextapplyLocalAttributesToContext(LayoutContext context)Retrieve the LayoutContext valid for the current node.protected voidchangeHook()Override this function to get notified whenever the contents of this element have changed.booleandispatchEvent(org.w3c.dom.events.Event evt)LayoutContextgetChildLayoutContext(int childNum, LayoutContext context)get the layout context for the given child.java.util.List<LayoutableNode>getChildrenToDraw()java.util.List<LayoutableNode>getChildrenToLayout()java.lang.StringgetClassName()The class attribute of the element.MathMLNodeListgetContents()Returns the children as a MathML NodeList.java.awt.FontgetFont(LayoutContext context)Gets the used font.java.awt.FontMetricsgetFontMetrics(java.awt.Graphics2D g, LayoutContext context)Gets the font metrics of the used font.java.lang.StringgetHref()The xlink:href attribute of the element.java.lang.StringgetId()The element's identifier.intgetIndexOfMathElement(JEuclidElement element)Gets index of child element.protected java.lang.StringgetMathAttribute(java.lang.String attrName)retrieve an attribute from the MathML or default name space, returning the default value if the attribute is not set.protected java.lang.StringgetMathAttribute(java.lang.String attrName, boolean useDefault)retrieve an attribute from the MathML or default name space.java.lang.StringgetMathbackground()Returns value of mathbackground attribute.java.lang.StringgetMathcolor()Returns value of mathcolor attribute.protected JEuclidElementgetMathElement(int index)Gets a child from this element.intgetMathElementCount()Returns the count of children for this element.java.lang.StringgetMathElementStyle()A string identifying the element's style attribute.java.lang.StringgetMathsize()Retrieve the mathsize attribute.java.lang.StringgetMathvariant()Returns value of mathvariant attribute (style of the element).MathVariantgetMathvariantAsVariant()Gets the current mathvariant.floatgetMiddleShift(java.awt.Graphics2D g, LayoutContext context)Returns the distance of the baseline and the middleline.MathMLMathElementgetOwnerMathElement()The MathMLMathElement corresponding to the nearest math element ancestor of this element.JEuclidElementgetParent()Returns parent of this element.java.lang.StringgetText()Returns the text content of this element.java.lang.StringgetXref()The xref attribute of the element.booleanhasChildPostscripts(JEuclidElement child, LayoutContext context)returns true is the child has postscripts attached to it.booleanhasChildPrescripts(JEuclidElement child)returns true is the child has prescripts attached to it.voidlayoutStage1(LayoutView view, LayoutInfo info, LayoutStage childMinStage, LayoutContext context)context insensitive layout.voidlayoutStage2(LayoutView view, LayoutInfo info, LayoutContext context)context sensitive layout.protected voidlayoutStageInvariant(LayoutView view, LayoutInfo info, LayoutStage stage, LayoutContext context)Layout for elements which are stage independent.voidsetClassName(java.lang.String className)setter for the className attribute.protected voidsetDefaultMathAttribute(java.lang.String key, java.lang.String value)Sets default values for math attributes.voidsetFakeParent(JEuclidElement parent)Sets the parent of this element.voidsetHref(java.lang.String href)setter for the href attribute.voidsetId(java.lang.String id)setter for the id attribute.voidsetMathbackground(java.lang.String mathbackground)Sets the value of the machbackground attribute.voidsetMathcolor(java.lang.String mathcolor)Sets value of math color attribute.protected voidsetMathElement(int index, MathMLElement newElement)Sets a specific child to the newElement, creating other subelements as necessary.voidsetMathElementStyle(java.lang.String mathElementStyle)setter for the mathElementStyle attribute.voidsetMathsize(java.lang.String mathsize)Sets mathsize to a new value.voidsetMathvariant(java.lang.String mathvariant)Sets value of mathvariant attribute (style of the element).voidsetXref(java.lang.String xref)setter for the xref attribute.-
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.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
-
-
-
-
Field Detail
-
ATTR_MATHVARIANT
public static final java.lang.String ATTR_MATHVARIANT
Constant for mathvariant attribute.- See Also:
- Constant Field Values
-
ATTR_MATHCOLOR
public static final java.lang.String ATTR_MATHCOLOR
Constant for mathcolor attribute.- See Also:
- Constant Field Values
-
ATTR_MATHSIZE
public static final java.lang.String ATTR_MATHSIZE
Constant for mathsize attribute.- See Also:
- Constant Field Values
-
ATTR_DEPRECATED_FONTFAMILY
public static final java.lang.String ATTR_DEPRECATED_FONTFAMILY
Constant for fontfamily attribute.- See Also:
- Constant Field Values
-
ATTR_DEPRECATED_FONTSTYLE
public static final java.lang.String ATTR_DEPRECATED_FONTSTYLE
Constant for fontstyle attribute.- See Also:
- Constant Field Values
-
ATTR_DEPRECATED_FONTWEIGHT
public static final java.lang.String ATTR_DEPRECATED_FONTWEIGHT
Constant for fontweight attribute.- See Also:
- Constant Field Values
-
ATTR_DEPRECATED_FONTSIZE
public static final java.lang.String ATTR_DEPRECATED_FONTSIZE
Constant for fontsize attribute.- See Also:
- Constant Field Values
-
ATTR_DEPRECATED_COLOR
public static final java.lang.String ATTR_DEPRECATED_COLOR
Constant for color attribute.- See Also:
- Constant Field Values
-
ATTR_DEPRECATED_BACKGROUND
public static final java.lang.String ATTR_DEPRECATED_BACKGROUND
Constant for background attribute.- See Also:
- Constant Field Values
-
ATTR_CLASS
public static final java.lang.String ATTR_CLASS
Constant for class attribute.- See Also:
- Constant Field Values
-
ATTR_STYLE
public static final java.lang.String ATTR_STYLE
Constant for style attribute.- See Also:
- Constant Field Values
-
ATTR_ID
public static final java.lang.String ATTR_ID
Constant for id attribute.- See Also:
- Constant Field Values
-
ATTR_HREF
public static final java.lang.String ATTR_HREF
Constant for href attribute.- See Also:
- Constant Field Values
-
ATTR_XREF
public static final java.lang.String ATTR_XREF
Constant for xref attribute.- See Also:
- Constant Field Values
-
ATTR_MATHBACKGROUND
public static final java.lang.String ATTR_MATHBACKGROUND
The mathbackground attribute.- See Also:
- Constant Field Values
-
TRIVIAL_SPACE_MAX
public static final int TRIVIAL_SPACE_MAX
largest value for all trivial spaces (= spaces that can be ignored / shortened).- See Also:
- Constant Field Values
-
URI
public static final java.lang.String URI
The URI from MathML.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractJEuclidElement
public AbstractJEuclidElement(java.lang.String qname, org.apache.batik.dom.AbstractDocument odoc)Default constructor. Sets MathML Namespace.- Parameters:
qname- Qualified name.odoc- Owner Document.
-
AbstractJEuclidElement
public AbstractJEuclidElement(java.lang.String nsUri, java.lang.String qname, org.apache.batik.dom.AbstractDocument odoc)Constructor to explicitly set the namespace.- Parameters:
nsUri- Namespace URI.qname- Qualified name.odoc- Owner Document.
-
-
Method Detail
-
getFont
public java.awt.Font getFont(LayoutContext context)
Gets the used font. Everything regardes font, processed by MathBase object.- Parameters:
context- LayoutContext to use.- Returns:
- Font Font object.
-
getMathvariantAsVariant
public MathVariant getMathvariantAsVariant()
Gets the current mathvariant.- Specified by:
getMathvariantAsVariantin interfaceJEuclidElement- Returns:
- the current MathVariant
-
addMathElement
public final void addMathElement(MathMLElement child)
Add a math element as a child.- Parameters:
child- Math element object.
-
getMathElement
protected JEuclidElement getMathElement(int index)
Gets a child from this element.Please note, that unlike the MathML DOM model functions this function uses a 0-based index.
- Parameters:
index- Index of the child (0-based).- Returns:
- The child MathElement object.
-
setMathElement
protected void setMathElement(int index, MathMLElement newElement)Sets a specific child to the newElement, creating other subelements as necessary.- Parameters:
index- the index to set (0=the first child)newElement- new element to be set as child.
-
getIndexOfMathElement
public int getIndexOfMathElement(JEuclidElement element)
Gets index of child element.- Specified by:
getIndexOfMathElementin interfaceJEuclidElement- Parameters:
element- Child element.- Returns:
- Index of the element, -1 if element was not found
-
getMathElementCount
public int getMathElementCount()
Returns the count of children for this element.- Specified by:
getMathElementCountin interfaceJEuclidElement- Returns:
- number of children.
-
getText
public java.lang.String getText()
Returns the text content of this element.- Returns:
- Text content.
-
setFakeParent
public void setFakeParent(JEuclidElement parent)
Sets the parent of this element.- Specified by:
setFakeParentin interfaceJEuclidElement- Parameters:
parent- Parent element
-
getParent
public JEuclidElement getParent()
Returns parent of this element.- Specified by:
getParentin interfaceJEuclidElement- Returns:
- Parent element.
-
setMathvariant
public void setMathvariant(java.lang.String mathvariant)
Sets value of mathvariant attribute (style of the element).- Parameters:
mathvariant- Value of mathvariant.
-
getMathvariant
public java.lang.String getMathvariant()
Returns value of mathvariant attribute (style of the element).- Returns:
- Value of mathvariant.
-
getFontMetrics
public java.awt.FontMetrics getFontMetrics(java.awt.Graphics2D g, LayoutContext context)Gets the font metrics of the used font.- Parameters:
context- LayoutContext to use.g- Graphics2D context to use.- Returns:
- Font metrics.
-
setMathcolor
public void setMathcolor(java.lang.String mathcolor)
Sets value of math color attribute.- Parameters:
mathcolor- Color object.
-
getMathcolor
public java.lang.String getMathcolor()
Returns value of mathcolor attribute.- Returns:
- Color as string.
-
getMathsize
public java.lang.String getMathsize()
Retrieve the mathsize attribute.- Returns:
- the mathsize attribute.
-
setMathsize
public void setMathsize(java.lang.String mathsize)
Sets mathsize to a new value.- Parameters:
mathsize- value of mathsize.
-
setDefaultMathAttribute
protected void setDefaultMathAttribute(java.lang.String key, java.lang.String value)Sets default values for math attributes. Default values are returned through getMathAttribute, but not stored in the actual DOM tree. This is necessary to support proper serialization.- Parameters:
key- the attribute to set.value- value of the attribute.
-
getMathAttribute
protected java.lang.String getMathAttribute(java.lang.String attrName)
retrieve an attribute from the MathML or default name space, returning the default value if the attribute is not set.- Parameters:
attrName- the name of the attribute- Returns:
- attribute value or null if not set.
- See Also:
getMathAttribute(String, boolean)
-
getMathAttribute
protected java.lang.String getMathAttribute(java.lang.String attrName, boolean useDefault)retrieve an attribute from the MathML or default name space.- Parameters:
attrName- the name of the attributeuseDefault- is true, the default value is used if the attribute is not set.- Returns:
- attribute value or null if not set.
- See Also:
getMathAttribute(String)
-
getMathbackground
public java.lang.String getMathbackground()
Returns value of mathbackground attribute.- Returns:
- Color as string.
-
setMathbackground
public void setMathbackground(java.lang.String mathbackground)
Sets the value of the machbackground attribute.- Parameters:
mathbackground- a string to be used as background color.
-
getMiddleShift
public float getMiddleShift(java.awt.Graphics2D g, LayoutContext context)Returns the distance of the baseline and the middleline.- Parameters:
context- Layout Context to useg- Graphics2D context to use.- Returns:
- Distance baseline - middleline.
-
getClassName
public java.lang.String getClassName()
The class attribute of the element. See the discussion elsewhere in this document of the class attribute; see also the HTML definition of this attribute.- Specified by:
getClassNamein interfaceMathMLElement- Returns:
- value of the className attribute.
-
setClassName
public void setClassName(java.lang.String className)
setter for the className attribute.- Specified by:
setClassNamein interfaceMathMLElement- Parameters:
className- new value for className.- See Also:
MathMLElement.getClassName()
-
getMathElementStyle
public java.lang.String getMathElementStyle()
A string identifying the element's style attribute.- Specified by:
getMathElementStylein interfaceMathMLElement- Returns:
- value of the mathElementStyle attribute.
-
setMathElementStyle
public void setMathElementStyle(java.lang.String mathElementStyle)
setter for the mathElementStyle attribute.- Specified by:
setMathElementStylein interfaceMathMLElement- Parameters:
mathElementStyle- new value for mathElementStyle.- See Also:
MathMLElement.getMathElementStyle()
-
getId
public java.lang.String getId()
The element's identifier. See the discussion elsewhere in this document of the id attribute; see also the HTML definition.- Specified by:
getIdin interfaceMathMLElement- Overrides:
getIdin classorg.apache.batik.dom.AbstractElement- Returns:
- value of the id attribute.
-
setId
public void setId(java.lang.String id)
setter for the id attribute.- Specified by:
setIdin interfaceMathMLElement- Parameters:
id- new value for id.- See Also:
MathMLElement.getId()
-
getXref
public java.lang.String getXref()
The xref attribute of the element. See the discussion elsewhere in this document of the xref attribute.- Specified by:
getXrefin interfaceMathMLElement- Returns:
- value of the xref attribute.
-
setXref
public void setXref(java.lang.String xref)
setter for the xref attribute.- Specified by:
setXrefin interfaceMathMLElement- Parameters:
xref- new value for xref.- See Also:
MathMLElement.getXref()
-
getHref
public java.lang.String getHref()
The xlink:href attribute of the element. See the discussion elsewhere in this document of the xlink:href attribute; see also the definition of this attribute in the XLink specification.- Specified by:
getHrefin interfaceMathMLElement- Returns:
- value of the href attribute.
-
setHref
public void setHref(java.lang.String href)
setter for the href attribute.- Specified by:
setHrefin interfaceMathMLElement- Parameters:
href- new value for href.- See Also:
MathMLElement.getHref()
-
getOwnerMathElement
public MathMLMathElement getOwnerMathElement()
The MathMLMathElement corresponding to the nearest math element ancestor of this element. Should be null if this element is a top-level math element.- Specified by:
getOwnerMathElementin interfaceMathMLElement- Returns:
- value of the ownerMathElement attribute.
-
hasChildPrescripts
public boolean hasChildPrescripts(JEuclidElement child)
returns true is the child has prescripts attached to it. In this case, there should be no extra space on the left.- Specified by:
hasChildPrescriptsin interfaceJEuclidElement- Parameters:
child- child to test- Returns:
- true if there are attached prescripts
-
hasChildPostscripts
public boolean hasChildPostscripts(JEuclidElement child, LayoutContext context)
returns true is the child has postscripts attached to it. In this case, there should be no extra space on the left.- Specified by:
hasChildPostscriptsin interfaceJEuclidElement- Parameters:
child- child to testcontext- current layout context.- Returns:
- true if there are attached postscripts
-
getContents
public MathMLNodeList getContents()
Returns the children as a MathML NodeList.- Returns:
- a list of children
-
getChildLayoutContext
public LayoutContext getChildLayoutContext(int childNum, LayoutContext context)
get the layout context for the given child.- Specified by:
getChildLayoutContextin interfaceJEuclidNode- Parameters:
childNum- 0-based number of the child to check.context- external context.- Returns:
- layout context to use.
-
applyLocalAttributesToContext
public LayoutContext applyLocalAttributesToContext(LayoutContext context)
Retrieve the LayoutContext valid for the current node.- Parameters:
context- external context.- Returns:
- the current layout context.
-
getChildrenToLayout
public java.util.List<LayoutableNode> getChildrenToLayout()
- Specified by:
getChildrenToLayoutin interfaceLayoutableNode- Returns:
- List of children to Layout. Normally, all children.
-
getChildrenToDraw
public java.util.List<LayoutableNode> getChildrenToDraw()
- Specified by:
getChildrenToDrawin interfaceLayoutableNode- Returns:
- List of children to Draw. Normally, all children.
-
layoutStageInvariant
protected void layoutStageInvariant(LayoutView view, LayoutInfo info, LayoutStage stage, LayoutContext context)
Layout for elements which are stage independent.This function will layout an element which is layed out the same no matter what stage it is in. This is the case for most elements.
Notable exceptions are mo and tables.
- Parameters:
view- View Object for this layout.info- An info object which will be filled during layout.stage- current layout stage.context- current LayoutContext.
-
layoutStage1
public void layoutStage1(LayoutView view, LayoutInfo info, LayoutStage childMinStage, LayoutContext context)
context insensitive layout.- Specified by:
layoutStage1in interfaceLayoutableNode- 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:
layoutStage2in interfaceLayoutableNode- Parameters:
view- LayoutView to use.info- LayoutInfo to manipulate.context- LayoutContext for this element.
-
changeHook
protected void changeHook()
Override this function to get notified whenever the contents of this element have changed.
-
dispatchEvent
public boolean dispatchEvent(org.w3c.dom.events.Event evt)
- Specified by:
dispatchEventin interfaceorg.w3c.dom.events.EventTarget- Specified by:
dispatchEventin interfaceorg.apache.batik.dom.events.NodeEventTarget- Overrides:
dispatchEventin classorg.apache.batik.dom.AbstractNode
-
-