jcckit.graphic
Class FontStyle
- java.lang.Object
-
- jcckit.graphic.FontStyle
-
public class FontStyle extends java.lang.ObjectFont style constants. This class is based on the typesafe enumeration pattern.
-
-
Field Summary
Fields Modifier and Type Field and Description static FontStyleBOLDFont style constant.static FontStyleBOLD_ITALICFont style constant.static FontStyleITALICFont style constant.static FontStyleNORMALFont style constant.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static FontStylegetFontStyle(ConfigParameters config, java.lang.String key, FontStyle defaultValue)Returns from the specified configuration parameters the font style defined by the specified key or the specified default value.java.lang.StringtoString()Returns a human readable description for pretty printing.
-
-
-
Field Detail
-
NORMAL
public static final FontStyle NORMAL
Font style constant.
-
BOLD
public static final FontStyle BOLD
Font style constant.
-
ITALIC
public static final FontStyle ITALIC
Font style constant.
-
BOLD_ITALIC
public static final FontStyle BOLD_ITALIC
Font style constant.
-
-
Method Detail
-
getFontStyle
public static FontStyle getFontStyle(ConfigParameters config, java.lang.String key, FontStyle defaultValue)
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
public java.lang.String toString()
Returns a human readable description for pretty printing.- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG