|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjaxe.equations.element.MathElement
public class MathElement
The basic class the the math elements. From this class elements inherits.
| Field Summary | |
|---|---|
private MathBase |
base
|
private java.util.Vector<MathElement> |
children
|
static java.lang.String |
FO_URI
The URI from FO |
private int |
fontsize
|
private MathElement |
parent
|
static java.lang.String |
SVG_URI
The URI from SVG |
private java.lang.StringBuilder |
text
|
static java.lang.String |
URI
The URI from MathML |
| Constructor Summary | |
|---|---|
MathElement()
Creates a math element |
|
MathElement(MathBase base)
Creates a math element |
|
MathElement(MathBase base,
int fontsize)
Creates a math element |
|
| Method Summary | |
|---|---|
void |
addMathElement(MathElement child)
Add a math element as a child |
void |
addText(java.lang.String text)
Add the content of a String to this element |
void |
debug(java.awt.Graphics g,
int posX,
int posY)
Paints a border around this element as debug information |
int |
getAscentHeight(boolean dynamicParts)
Return the current height of the upper part of this component from the baseline |
int |
getDescentHeight(boolean dynamicParts)
Return the current height of the lower part of this component from the baseline |
java.awt.Font |
getFont()
Gets the used font |
java.awt.FontMetrics |
getFontMetrics()
Gets the font metrics of the used font |
int |
getFontSize()
Gets the used font size |
int |
getHeight(boolean dynamicParts)
Return the current height of this element |
MathBase |
getMathBase()
Gets the math base |
MathElement |
getMathElement(int index)
Gets a child from this element |
int |
getMathElementCount()
Returns the count of children from this element |
protected int |
getMiddleShift()
Returns the distance of the baseline and the middleline |
MathElement |
getParent()
Returns get parent of this element |
java.awt.Font |
getSymbolFont()
Gets the used symbol font size |
java.awt.FontMetrics |
getSymbolFontMetrics()
Gets the font metrics of the used symbol font |
java.awt.font.GlyphVector |
getSymbolGlyphVector(java.awt.Graphics2D g2d,
char c)
Get a glyph vector of the symbol font |
java.lang.String |
getText()
Returns the text contentof this element |
int |
getWidth(boolean dynamicParts)
Return the current width of this element |
void |
paint(java.awt.Graphics g,
int posX,
int posY)
Paints this element |
void |
setFontSize(int fontsize)
Sets the font size for this component |
void |
setMathBase(MathBase base)
Sets the base for this element |
void |
setMathElementAt(MathElement child,
int index)
Sets a child from this element |
void |
setParent(MathElement parent)
Sets the parent of this element |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String URI
public static final java.lang.String SVG_URI
public static final java.lang.String FO_URI
private MathBase base
private MathElement parent
private int fontsize
private final java.util.Vector<MathElement> children
private final java.lang.StringBuilder text
| Constructor Detail |
|---|
public MathElement(MathBase base,
int fontsize)
base - The base for the math element treefontsize - The font size for this elementpublic MathElement(MathBase base)
base - The base for the math element treepublic MathElement()
| Method Detail |
|---|
public void addMathElement(MathElement child)
child - Math elementpublic MathElement getMathElement(int index)
index - Index of the child
public void setMathElementAt(MathElement child,
int index)
index - Index of the childpublic int getMathElementCount()
public void addText(java.lang.String text)
text - Textpublic java.lang.String getText()
public void setMathBase(MathBase base)
base - Math basepublic MathBase getMathBase()
public void setParent(MathElement parent)
parent - Parent elementpublic MathElement getParent()
public void setFontSize(int fontsize)
fontsize - Font sizepublic int getFontSize()
public java.awt.Font getFont()
public java.awt.FontMetrics getFontMetrics()
public java.awt.Font getSymbolFont()
public java.awt.FontMetrics getSymbolFontMetrics()
public java.awt.font.GlyphVector getSymbolGlyphVector(java.awt.Graphics2D g2d,
char c)
g2d - The graphic context presented by a Graphics2Dindex - Index of the glyph vector
public void debug(java.awt.Graphics g,
int posX,
int posY)
g - The graphics context to use for paintingposX - The first left position for paintingposY - The position of the baseline
public void paint(java.awt.Graphics g,
int posX,
int posY)
g - The graphics context to use for paintingposX - The first left position for paintingposY - The position of the baselinepublic int getWidth(boolean dynamicParts)
dynamicParts -
public int getHeight(boolean dynamicParts)
dynamicParts - Should be true, if the calculation consider the elements,
which has not fixed sizes
public int getAscentHeight(boolean dynamicParts)
dynamicParts - Should be true, if the calculation consider the elements,
which has not fixed sizes
public int getDescentHeight(boolean dynamicParts)
dynamicParts - Should be true, if the calculation consider the elements,
which has not fixed sizes
protected int getMiddleShift()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||