Package org.scilab.forge.jlatexmath
Class TeXEnvironment
- java.lang.Object
-
- org.scilab.forge.jlatexmath.TeXEnvironment
-
public class TeXEnvironment extends java.lang.Object
Contains the used TeXFont-object, color settings and the current style in which a formula must be drawn. It's used in the createBox-methods. Contains methods that apply the style changing rules for subformula's.
-
-
Field Summary
Fields Modifier and Type Field Description boolean
isColored
-
Constructor Summary
Constructors Constructor Description TeXEnvironment(int style, TeXFont tf)
TeXEnvironment(int style, TeXFont tf, int widthUnit, float textwidth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TeXEnvironment
copy()
protected TeXEnvironment
copy(TeXFont tf)
TeXEnvironment
crampStyle()
TeXEnvironment
denomStyle()
java.awt.Color
getBackground()
java.awt.Color
getColor()
float
getInterline()
int
getLastFontId()
float
getScaleFactor()
float
getSize()
boolean
getSmallCap()
float
getSpace()
int
getStyle()
TeXFont
getTeXFont()
java.lang.String
getTextStyle()
float
getTextwidth()
TeXEnvironment
numStyle()
void
reset()
Resets the color settings.TeXEnvironment
rootStyle()
void
setBackground(java.awt.Color c)
void
setColor(java.awt.Color c)
void
setInterline(int unit, float len)
void
setLastFontId(int id)
void
setScaleFactor(float f)
void
setSmallCap(boolean smallCap)
void
setStyle(int style)
void
setTextStyle(java.lang.String textStyle)
void
setTextwidth(int widthUnit, float textwidth)
TeXEnvironment
subStyle()
TeXEnvironment
supStyle()
-
-
-
Method Detail
-
setInterline
public void setInterline(int unit, float len)
-
getInterline
public float getInterline()
-
setTextwidth
public void setTextwidth(int widthUnit, float textwidth)
-
getTextwidth
public float getTextwidth()
-
setScaleFactor
public void setScaleFactor(float f)
-
getScaleFactor
public float getScaleFactor()
-
copy
protected TeXEnvironment copy()
-
copy
protected TeXEnvironment copy(TeXFont tf)
-
crampStyle
public TeXEnvironment crampStyle()
- Returns:
- a copy of the environment, but in a cramped style.
-
denomStyle
public TeXEnvironment denomStyle()
- Returns:
- a copy of the environment, but in denominator style.
-
getBackground
public java.awt.Color getBackground()
- Returns:
- the background color setting
-
getColor
public java.awt.Color getColor()
- Returns:
- the foreground color setting
-
getSize
public float getSize()
- Returns:
- the point size of the TeXFont
-
getStyle
public int getStyle()
- Returns:
- the current style
-
setStyle
public void setStyle(int style)
-
getTextStyle
public java.lang.String getTextStyle()
- Returns:
- the current textStyle
-
setTextStyle
public void setTextStyle(java.lang.String textStyle)
-
getSmallCap
public boolean getSmallCap()
- Returns:
- the current textStyle
-
setSmallCap
public void setSmallCap(boolean smallCap)
-
getTeXFont
public TeXFont getTeXFont()
- Returns:
- the TeXFont to be used
-
numStyle
public TeXEnvironment numStyle()
- Returns:
- a copy of the environment, but in numerator style.
-
reset
public void reset()
Resets the color settings.
-
rootStyle
public TeXEnvironment rootStyle()
- Returns:
- a copy of the environment, but with the style changed for roots
-
setBackground
public void setBackground(java.awt.Color c)
- Parameters:
c
- the background color to be set
-
setColor
public void setColor(java.awt.Color c)
- Parameters:
c
- the foreground color to be set
-
subStyle
public TeXEnvironment subStyle()
- Returns:
- a copy of the environment, but in subscript style.
-
supStyle
public TeXEnvironment supStyle()
- Returns:
- a copy of the environment, but in superscript style.
-
getSpace
public float getSpace()
-
setLastFontId
public void setLastFontId(int id)
-
getLastFontId
public int getLastFontId()
-
-