Package org.scilab.forge.jlatexmath
Class TeXFormula.TeXIconBuilder
java.lang.Object
org.scilab.forge.jlatexmath.TeXFormula.TeXIconBuilder
- Enclosing class:
- TeXFormula
Apply the Builder pattern instead of using the createTeXIcon(...) factories
- Author:
- Felix Natter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create a TeXIcon from the information gathered by the (chained) setXXX() methods.setFGColor
(Color fgcolor) Specify the background color for rendering the given TeXFormulasetInterLineSpacing
(int interLineUnit, float interLineSpacing) Specify the inter line spacing unit and value.setIsMaxWidth
(boolean isMaxWidth) Specifies whether the width is the exact or the maximum widthsetSize
(float size) Specify the font size for rendering the given TeXFormulasetStyle
(int style) Specify the style for rendering the given TeXFormulasetTrueValues
(boolean trueValues) Specify the "true values" parameter for rendering the given TeXFormulasetType
(int type) Specify the font type for rendering the given TeXFormulasetWidth
(int widthUnit, float textWidth, int align) Specify the width of the formula (may be exact or maximum width, seesetIsMaxWidth(boolean)
)
-
Constructor Details
-
TeXIconBuilder
public TeXIconBuilder()
-
-
Method Details
-
setStyle
Specify the style for rendering the given TeXFormula- Parameters:
style
- the style- Returns:
- the builder, used for chaining
-
setSize
Specify the font size for rendering the given TeXFormula- Parameters:
size
- the size- Returns:
- the builder, used for chaining
-
setType
Specify the font type for rendering the given TeXFormula- Parameters:
type
- the font type- Returns:
- the builder, used for chaining
-
setFGColor
Specify the background color for rendering the given TeXFormula- Parameters:
fgcolor
- the foreground color- Returns:
- the builder, used for chaining
-
setTrueValues
Specify the "true values" parameter for rendering the given TeXFormula- Parameters:
trueValues
- the "true values" value- Returns:
- the builder, used for chaining
-
setWidth
Specify the width of the formula (may be exact or maximum width, seesetIsMaxWidth(boolean)
)- Parameters:
widthUnit
- the width unittextWidth
- the widthalign
- the alignment- Returns:
- the builder, used for chaining
-
setIsMaxWidth
Specifies whether the width is the exact or the maximum width- Parameters:
isMaxWidth
- whether the width is a maximum width- Returns:
- the builder, used for chaining
-
setInterLineSpacing
Specify the inter line spacing unit and value. NOTE: this is required for automatic linebreaks to work!- Parameters:
interLineUnit
- the unitinterLineSpacing
- the value- Returns:
- the builder, used for chaining
-
build
Create a TeXIcon from the information gathered by the (chained) setXXX() methods. (see Builder pattern)- Returns:
- the TeXIcon
-