Package com.iizix.prop
Class GFont
java.lang.Object
com.iizix.prop.GFont
- All Implemented Interfaces:
- Cloneable
A font specifies the properties for a Font used in text operations.
- Author:
- Christopher Mindus
- Field SummaryFieldsModifier and TypeFieldDescription- static final GFontThe default font: 10p serif.- final StringThe font family CSS value.- final StringThe CSS font size (including units), e.g.- final StringThe CSS font style: "normal", "italic" or "oblique".- final StringThe font variant, default "normal".- final StringThe font weight as CSS value, e.g.
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- booleanChecks if two font objects are equal.- booleanChecks if two font objects are equal.Gets the font as a String in the form described below.- toString()Returns a string representation of this class instance and its values.
- Field Details- DEFAULTThe default font: 10p serif.
- familyThe font family CSS value.
- sizeThe CSS font size (including units), e.g. "10pt".
- weightThe font weight as CSS value, e.g. "bold", default "normal".
- styleThe CSS font style: "normal", "italic" or "oblique".
- variantThe font variant, default "normal".
 
- Constructor Details- GFontCreates an new normal font.- Parameters:
- family- The font family CSS value.
- size- The CSS font size (including units), e.g. "10pt".
- Throws:
- NullPointerException- If family or size is null.
 
- GFontCreates an new normal font.- Parameters:
- family- The font family CSS value.
- size- The CSS font size (including units), e.g. "10pt".
- weight- The font weight as CSS value, e.g. "bold", default "normal".
- style- The CSS font style: "normal", "italic" or "oblique".
- variant- The font variant, default "normal".
- Throws:
- NullPointerException- If family, size, weight, style or variant is null.
 
 
- Method Details- equalsChecks if two font objects are equal.
- equalsChecks if two font objects are equal.- Parameters:
- font- another font object. If null, the fonts are not equal.
- Returns:
- true if equal, false otherwise.
 
- getStringGets the font as a String in the form described below.- Returns:
- the String as described above.
 
- toStringReturns a string representation of this class instance and its values.