|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjaxe.equations.MathBase
public class MathBase
The base for creating a MathElement tree
| Field Summary | |
|---|---|
private boolean |
debug
|
static int |
DISPLAY
Non inline mathematical expression |
private int |
displayfontsize
|
private java.awt.FontMetrics[] |
fontmetrics
|
private java.lang.String |
fontname
|
private java.awt.Font[] |
fonts
|
private int |
fontstyle
|
private java.util.Vector<java.awt.Font> |
goodFonts
|
static int |
INLINE
Inline mathematical expression |
private int |
inlinefontsize
|
private static org.apache.log4j.Logger |
LOG
Logger for this class |
private int |
maxfontsize
|
private int |
minfontsize
|
private int |
mode
|
private int[] |
MS_Symbol_codes
|
private MathRootElement |
rootElement
|
private char[] |
Symbol_chars
|
private java.awt.FontMetrics[] |
symbolFontmetrics
|
private java.awt.Font[] |
symbolFonts
|
boolean |
windaube
|
| Constructor Summary | |
|---|---|
MathBase(MathRootElement element,
java.awt.Graphics gcalc)
Creates a MathBase |
|
MathBase(MathRootElement element,
java.lang.String fontname,
int fontstyle,
int inlinefontsize,
int displayfontsize,
java.awt.Graphics gcalc)
Creates a MathBase |
|
MathBase(java.lang.String fontname,
int fontstyle,
int inlinefontsize,
int displayfontsize,
java.awt.Graphics gcalc)
Creates a MathBase |
|
| Method Summary | |
|---|---|
java.lang.String |
findFont(java.lang.String s,
java.awt.Font defaultFont)
|
int |
getDefaultDisplayFontSize()
Get the default font size for non inline equations |
int |
getDefaultInlineFontSize()
Get the default font size |
java.awt.Font |
getFont(int fontsize)
Get a font specified by the font size |
java.awt.FontMetrics |
getFontMetrics(int fontsize)
Get the font metrics specified by the font size |
int |
getHeight()
Return the current height of this component |
java.awt.Font |
getSymbolFont(int fontsize)
Get a symbol font specified by the font size |
java.awt.FontMetrics |
getSymbolFontMetrics(int fontsize)
Get the font metrics of the symbol font specified by the font size |
java.awt.font.GlyphVector |
getSymbolGlyphVector(java.awt.Graphics2D g2d,
int fontsize,
char c)
Get a glyph vector of the symbol font |
int |
getWidth()
Return the current width of this component |
boolean |
isDebug()
Indicates, if the debug mode is enabled |
void |
paint(java.awt.Graphics g)
Paints this component and all of its elements |
void |
setDebug(boolean debug)
Enables, or disables the debug mode |
void |
setDefaultDisplayFontSize(int fontsize)
Sets the default font size for non inline equations |
void |
setDefaultFontSize(int fontsize)
Sets the default font size, which used for the root element |
void |
setRootElement(MathRootElement element)
Set the root element of a math tree |
private void |
setupFontMetrics(java.awt.Graphics gcalc)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final org.apache.log4j.Logger LOG
private java.lang.String fontname
private int fontstyle
private int inlinefontsize
private int displayfontsize
private final int minfontsize
private final int maxfontsize
private final java.awt.Font[] fonts
private java.awt.FontMetrics[] fontmetrics
private final java.awt.Font[] symbolFonts
private java.awt.FontMetrics[] symbolFontmetrics
private boolean debug
public static final int INLINE
public static final int DISPLAY
private final int mode
private MathRootElement rootElement
public boolean windaube
private final char[] Symbol_chars
private final int[] MS_Symbol_codes
private final java.util.Vector<java.awt.Font> goodFonts
| Constructor Detail |
|---|
public MathBase(MathRootElement element,
java.lang.String fontname,
int fontstyle,
int inlinefontsize,
int displayfontsize,
java.awt.Graphics gcalc)
element - Root element of a math treefontname - Name of the preferred fontfontstyle - Style of the preferred font, see java.awt.Fontinlinefontsize - Size of the preferred font used by inline equationsdisplayfontsize - Size of the preferred font used by non inline equationsgcalc - Graphics object to use to calculate character sizes (nothing will be painted on it)
public MathBase(MathRootElement element,
java.awt.Graphics gcalc)
element - Root element of a math treegcalc - Graphics object to use to calculate character sizes (nothing will be painted on it)
public MathBase(java.lang.String fontname,
int fontstyle,
int inlinefontsize,
int displayfontsize,
java.awt.Graphics gcalc)
fontname - Name of the preferred fontfontstyle - Style of the preferred font, see java.awt.Fontinlinefontsize - Size of the preferred font used by inline equationsdisplayfontsize - Size of the preferred font used by non inline equationsgcalc - Graphics object to use to calculate character sizes (nothing will be painted on it)| Method Detail |
|---|
private void setupFontMetrics(java.awt.Graphics gcalc)
public void setRootElement(MathRootElement element)
element - Root element of a math treepublic void setDebug(boolean debug)
debug - Debug modepublic boolean isDebug()
public void setDefaultFontSize(int fontsize)
fontsize - Font sizepublic int getDefaultInlineFontSize()
public void setDefaultDisplayFontSize(int fontsize)
fontsize - Default font sizepublic int getDefaultDisplayFontSize()
public java.awt.Font getFont(int fontsize)
fontsize - Font size
public java.awt.Font getSymbolFont(int fontsize)
fontsize - Font Size
public java.lang.String findFont(java.lang.String s,
java.awt.Font defaultFont)
public java.awt.FontMetrics getFontMetrics(int fontsize)
fontsize - Font size
public java.awt.FontMetrics getSymbolFontMetrics(int fontsize)
fontsize - Font size
public java.awt.font.GlyphVector getSymbolGlyphVector(java.awt.Graphics2D g2d,
int fontsize,
char c)
g2d - The graphic context presented by a Graphics2Dfontsize - Font sizeindex - Index of the glyph vector
public void paint(java.awt.Graphics g)
g - The graphics context to use for paintingpublic int getWidth()
public int getHeight()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||