|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JEuclidElement
Interface for all MathElements within JEuclid.
| Field Summary |
|---|
| Method Summary | |
|---|---|
float |
calculateAscentHeight(Graphics2D g)
Returns the current height of the upper part (over the base line). |
float |
calculateDescentHeight(Graphics2D g)
Calculates descent height (under the base line) of the element. |
Color |
getBackgroundColor()
Returns background color of the element. |
Color |
getForegroundColor()
Gets the color that this element is supposed to use for rendering its foreground elements. |
float |
getGlobalLineCorrector()
Returns value of the vertical shift for the specific elements in the line. |
int |
getIndexOfMathElement(JEuclidElement element)
Gets index of child element. |
MathBase |
getMathBase()
Gets the math base. |
JEuclidElement |
getMathElement(int index)
Gets a child from this element. |
int |
getMathElementCount()
Returns the count of childs from this element. |
MathVariant |
getMathvariantAsVariant()
Gets the current mathvariant. |
JEuclidElement |
getParent()
Returns parent of this element. |
int |
getScriptlevelForChild(JEuclidElement child)
Retrieves the scriptlevel for a certain child. |
boolean |
hasChildPostscripts(JEuclidElement child)
returns true is the child has postscripts attached to it. |
boolean |
hasChildPrescripts(JEuclidElement child)
returns true is the child has prescripts attached to it. |
boolean |
isCalculatingSize()
returns true if the parent is currently calculating its size. |
boolean |
isChildBlock(JEuclidElement child)
Returns true if the child should be displayed as a block (not inline). |
void |
setCalculatingSize(boolean calculatingSize)
|
void |
setFakeParent(JEuclidElement parent)
Sets the parent of this element. |
void |
setGlobalLineCorrector(float corrector)
Sets value of the vertical shift for the specific elements in the line. |
void |
setMathAttributes(AttributeMap attributes)
convenience method to set multiple attributes at once. |
void |
setMathElement(int index,
MathMLElement newElement)
Sets a specific child to the newElement, creating other subelements as necessary. |
| 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.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 |
| Methods inherited from interface net.sourceforge.jeuclid.elements.DisplayableNode |
|---|
getAscentHeight, getDescentHeight, getHeight, getPaintedPosX, getPaintedPosY, getWidth, getXCenter, paint |
| Methods inherited from interface net.sourceforge.jeuclid.elements.JEuclidNode |
|---|
getFontsizeInPoint, getMathsizeInPoint |
| Methods inherited from interface net.sourceforge.jeuclid.dom.ChangeTrackingInterface |
|---|
addListener, fireChanged, fireChangeForSubTree |
| Method Detail |
|---|
void setFakeParent(JEuclidElement parent)
parent - Parent elementvoid setMathAttributes(AttributeMap attributes)
attributes - List of attribute names and values.boolean isCalculatingSize()
float calculateAscentHeight(Graphics2D g)
g - Graphics2D context to use.
float calculateDescentHeight(Graphics2D g)
g - Graphics2D context to use.
void setCalculatingSize(boolean calculatingSize)
calculatingSize - the calculatingSize to setColor getBackgroundColor()
Color getForegroundColor()
float getGlobalLineCorrector()
setGlobalLineCorrector(float)int getIndexOfMathElement(JEuclidElement element)
element - Child element.
MathVariant getMathvariantAsVariant()
void setGlobalLineCorrector(float corrector)
corrector - Value of corrector.getGlobalLineCorrector()JEuclidElement getMathElement(int index)
Please note, that unlike the MathML DOM model functions this function uses a 0-based index.
index - Index of the child (0-based).
void setMathElement(int index,
MathMLElement newElement)
index - the index to set (0=the firt child)newElement - new element to be set as child.int getScriptlevelForChild(JEuclidElement child)
child - element node of the child.
JEuclidElement getParent()
boolean isChildBlock(JEuclidElement child)
child - child to test
boolean hasChildPrescripts(JEuclidElement child)
child - child to test
boolean hasChildPostscripts(JEuclidElement child)
child - child to test
int getMathElementCount()
MathBase getMathBase()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||