Package jcckit.graphic
Class FontStyle
java.lang.Object
jcckit.graphic.FontStyle
Font style constants.
This class is based on the typesafe enumeration pattern.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic FontStylegetFontStyle(ConfigParameters config, String key, FontStyle defaultValue) Returns from the specified configuration parameters the font style defined by the specified key or the specified default value.toString()Returns a human readable description for pretty printing.
-
Field Details
-
NORMAL
Font style constant. -
BOLD
Font style constant. -
ITALIC
Font style constant. -
BOLD_ITALIC
Font style constant.
-
-
Method Details
-
getFontStyle
Returns from the specified configuration parameters the font style defined by the specified key or the specified default value.- Parameters:
config- Configuration parameters.key- The key of the font style.defaultValue- The default value.- Returns:
- one of the four instances of FontStyle.
- Throws:
FactoryException- if the value of the key-value pair denoted by key is neither normal, bold, italic, nor bold italic, Note, thatFactoryException.getClassName()returns the invalid value.
-
toString
Returns a human readable description for pretty printing.
-