Package com.iizix.prop.font
Class FontConsumed
java.lang.Object
com.iizix.prop.font.FontConsumed
Class representing a consumed font. This class is used e.g. to collect information about components (including its children) in order to gather the required fonts.
- Author:
- Christopher Mindus
- Field SummaryFields
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- static void- collectConsumedFonts- (PropCnr comp, Set<FontConsumed> fonts) Collects all fonts in a component and its children recursively.- booleanChecks if the consumed fonts are equal.- static Set<FontConsumed>- getConsumedFonts- (PropCnr comp) Collects all fonts in a component and its children recursively.- getStyle()Gets the style.Gets the weight.- int- hashCode()The hash code.
- Field Details- familyThe font family. The font family may consist of a list of fonts that is comma separated.
 
- Constructor Details- FontConsumedConstructor.- Parameters:
- family- The font family, cannot be null.
- style- The style, null for undefined.
- weight- The weight, null for undefined.
- Throws:
- NullPointerException- If font family is null.
 
 
- Method Details- getConsumedFontsCollects all fonts in a component and its children recursively.- Parameters:
- comp- The component to collect fonts from.
- Returns:
- The set of consumed fonts by the component and its children (recursively).
 
- collectConsumedFontsCollects all fonts in a component and its children recursively.- Parameters:
- comp- The component to collect fonts from.
- fonts- The set of fonts to collect the information to.
 
- getStyleGets the style. The style is not always the same as the value of the constructor.- Returns:
- The style string, null if undefined, empty string for "unknown" values (e.g. "inherit").
 
- getWeightGets the weight. The weight is not always the same as the value of the constructor.- Returns:
- The weight string, null if undefined, empty string for "unknown" values (e.g. "inherit", "bolder" or "lighter").
 
- equalsChecks if the consumed fonts are equal.
- hashCodepublic int hashCode()The hash code.