|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jeuclid.dom.AbstractPartialNodeImpl
net.sourceforge.jeuclid.dom.AbstractPartialElementImpl
net.sourceforge.jeuclid.dom.AbstractChangeTrackingElement
net.sourceforge.jeuclid.elements.AbstractJEuclidElement
net.sourceforge.jeuclid.elements.presentation.script.AbstractUnderOver
public abstract class AbstractUnderOver
Implementation and helper methods for munder, mover, and munderover.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.sourceforge.jeuclid.dom.AbstractPartialElementImpl |
|---|
AbstractPartialElementImpl.AttributeNodeMap, AbstractPartialElementImpl.AttrImpl |
| Nested classes/interfaces inherited from class net.sourceforge.jeuclid.dom.AbstractPartialNodeImpl |
|---|
AbstractPartialNodeImpl.NodeList |
| Field Summary | |
|---|---|
static String |
ATTR_ACCENT
attribute for accent property. |
static String |
ATTR_ACCENTUNDER
attribute for accentunder property. |
static float |
NON_ACCENT_MULTIPLIER
Space for non-accents multiplied by this value. |
static String |
UNDER_OVER_SPACE
Space between base and under/over for accents. |
| Fields inherited from class net.sourceforge.jeuclid.elements.AbstractJEuclidElement |
|---|
ALIGN_AXIS, ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_TOP, 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 |
| Constructor Summary | |
|---|---|
AbstractUnderOver(MathBase base)
default constructor. |
|
| 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. |
float |
calculateWidth(Graphics2D g)
Caculates width of the element. |
String |
getAccent()
Either true or false if present; a string controlling whether overscript is drawn as an accent or as a limit, if specified; this is the element's accent attribute. |
protected boolean |
getAccentAsBoolean()
returns the accent property as boolean. |
String |
getAccentunder()
Either true or false if present; a string controlling whether underscript is drawn as an accent or as a limit, if specified; this is the element's accentunder attribute. |
protected boolean |
getAccentunderAsBoolean()
returns the accentunder property as boolean. |
JEuclidElement |
getBase()
A MathMLElement representing the base of the script. |
protected float |
getOverBaselineShift(Graphics2D g)
|
abstract JEuclidElement |
getOverscript()
A MathMLElement representing the overscript of the script. |
int |
getScriptlevelForChild(JEuclidElement child)
Retrieves the scriptlevel for a certain child. |
protected float |
getUnderBaselineShift(Graphics2D g)
|
abstract JEuclidElement |
getUnderscript()
A MathMLElement representing the underscript of the script. |
float |
getXCenter(Graphics2D g)
Returns the center X coordinate of the content. |
boolean |
hasChildPostscripts(JEuclidElement child)
returns true is the child has postscripts attached to it. |
boolean |
isChildBlock(JEuclidElement child)
Returns true if the child should be displayed as a block (not inline). |
protected boolean |
limitsAreMoved()
|
void |
paint(Graphics2D g,
float posX,
float posY)
Paints this element. |
void |
setAccent(String accent)
setter for the accent attribute. |
void |
setAccentunder(String accentunder)
setter for the accentunder attribute. |
void |
setBase(MathMLElement base)
setter for the base attribute. |
| Methods inherited from class net.sourceforge.jeuclid.dom.AbstractChangeTrackingElement |
|---|
addListener, appendChild, fireChanged, fireChangeForSubTree, replaceChild, setAttribute, setTextContent |
| Methods inherited from class net.sourceforge.jeuclid.dom.AbstractPartialElementImpl |
|---|
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getElementsByTagName, getElementsByTagNameNS, getLocalName, getNodeName, getNodeType, getSchemaTypeInfo, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, toString |
| Methods inherited from class net.sourceforge.jeuclid.dom.AbstractPartialNodeImpl |
|---|
cloneNode, compareDocumentPosition, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, setNodeValue, setPrefix, setUserData |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.mathml.MathMLUnderOverElement |
|---|
setOverscript, setUnderscript |
| 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.dom.ChangeTrackingInterface |
|---|
addListener, fireChanged, fireChangeForSubTree |
| Field Detail |
|---|
public static final String UNDER_OVER_SPACE
public static final float NON_ACCENT_MULTIPLIER
public static final String ATTR_ACCENT
public static final String ATTR_ACCENTUNDER
| Constructor Detail |
|---|
public AbstractUnderOver(MathBase base)
base - Mathbase to use.| Method Detail |
|---|
public String getAccent()
getAccent in interface MathMLUnderOverElementprotected boolean getAccentAsBoolean()
protected boolean limitsAreMoved()
protected float getUnderBaselineShift(Graphics2D g)
g - Graphics Context.
protected float getOverBaselineShift(Graphics2D g)
g - Graphics Context.
public final float calculateAscentHeight(Graphics2D g)
calculateAscentHeight in interface JEuclidElementcalculateAscentHeight in class AbstractJEuclidElementg - Graphics2D context to use.
public final float calculateDescentHeight(Graphics2D g)
calculateDescentHeight in interface JEuclidElementcalculateDescentHeight in class AbstractJEuclidElementg - Graphics2D context to use.
public float getXCenter(Graphics2D g)
getXCenter in interface DisplayableNodegetXCenter in class AbstractJEuclidElementg - X-offset of the horizontal center of the actual content.
public float calculateWidth(Graphics2D g)
calculateWidth in class AbstractJEuclidElementg - Graphics2D context to use.
public final void paint(Graphics2D g,
float posX,
float posY)
paint in interface DisplayableNodepaint in class AbstractJEuclidElementg - The graphics context to use for painting.posX - The first left position for painting.posY - The position of the baseline.public String getAccentunder()
getAccentunder in interface MathMLUnderOverElementpublic int getScriptlevelForChild(JEuclidElement child)
getScriptlevelForChild in interface JEuclidElementgetScriptlevelForChild in class AbstractJEuclidElementchild - element node of the child.
public boolean isChildBlock(JEuclidElement child)
isChildBlock in interface JEuclidElementisChildBlock in class AbstractJEuclidElementchild - child to test
protected boolean getAccentunderAsBoolean()
public JEuclidElement getBase()
getBase in interface MathMLUnderOverElementpublic abstract JEuclidElement getOverscript()
getOverscript in interface MathMLUnderOverElementpublic abstract JEuclidElement getUnderscript()
getUnderscript in interface MathMLUnderOverElementpublic void setAccent(String accent)
setAccent in interface MathMLUnderOverElementaccent - new value for accent.MathMLUnderOverElement.getAccent()public void setAccentunder(String accentunder)
setAccentunder in interface MathMLUnderOverElementaccentunder - new value for accentunder.MathMLUnderOverElement.getAccentunder()public void setBase(MathMLElement base)
setBase in interface MathMLUnderOverElementbase - new value for base.MathMLUnderOverElement.getBase()public boolean hasChildPostscripts(JEuclidElement child)
hasChildPostscripts in interface JEuclidElementhasChildPostscripts in class AbstractJEuclidElementchild - child to test
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||