Class MathVariant
java.lang.Object
net.sourceforge.jeuclid.elements.support.attributes.MathVariant
- All Implemented Interfaces:
Serializable
Class to represent and use MathVariants.
- Version:
- $Revision: e6bd6c2d9bf4 $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MathVariantMathvariant constant.static final MathVariantMathvariant constant.static final MathVariantMathvariant constant.static final MathVariantMathvariant constant.static final MathVariantMathvariant constant.static final MathVariantMathvariant constant.static final MathVariantMathvariant constant.static final MathVariantMathvariant constant.static final MathVariantMathvariant constant.static final MathVariantMathvariant constant.static final MathVariantMathvariant constant.static final MathVariantMathvariant constant.static final MathVariantMathvariant constant.static final MathVariantMathvariant constant. -
Constructor Summary
ConstructorsConstructorDescriptionMathVariant(int awtstyle, FontFamily family) Creates a Mathvariant with the given AWT-Style and font-family. -
Method Summary
Modifier and TypeMethodDescriptioncreateFont(float size, int codepoint, LayoutContext context, boolean force) Create a font for the given attributes.booleanintinthashCode()static MathVariantstringToMathVariant(String variant) Creates a Mathvariant object from an attribute value.toString()
-
Field Details
-
BOLD
Mathvariant constant. Bold style. -
BOLD_FRAKTUR
Mathvariant constant. Bold fraktur style. -
BOLD_ITALIC
Mathvariant constant. Bold-italic style. -
BOLD_SANS_SERIF
Mathvariant constant. Bold sans-serif style. -
BOLD_SCRIPT
Mathvariant constant. Bold script style. -
DOUBLE_STRUCK
Mathvariant constant. Double struck style. -
FRAKTUR
Mathvariant constant. Fraktur style. -
ITALIC
Mathvariant constant. Italic style. -
MONOSPACE
Mathvariant constant. Monospace style. -
NORMAL
Mathvariant constant. Normal style. -
SANS_SERIF
Mathvariant constant. Sans-serif style. -
SANS_SERIF_BOLD_ITALIC
Mathvariant constant. Bold italic sans-serif style. -
SANS_SERIF_ITALIC
Mathvariant constant. Italic sans-serif style. -
SCRIPT
Mathvariant constant. Script style.
-
-
Constructor Details
-
MathVariant
Creates a Mathvariant with the given AWT-Style and font-family.- Parameters:
awtstyle- the awt Stylefamily- the font family
-
-
Method Details
-
stringToMathVariant
Creates a Mathvariant object from an attribute value.- Parameters:
variant- the string representation of the attribute value- Returns:
- a mathVariant object or null if none is found.
-
createFont
Create a font for the given attributes.- Parameters:
size- size of the font to createcodepoint- a character that must exist in this fontcontext- LayoutContext to use.force- if true will always return a font, otherwise will return null.- Returns:
- a font object.
-
getAwtStyle
public int getAwtStyle()- Returns:
- the awtStyle
-
getFontFamily
- Returns:
- the fontFamily
-
hashCode
public int hashCode() -
equals
-
toString
-