Package weka.core
Class FontHelper
java.lang.Object
weka.core.FontHelper
Wrapper class for Font objects. Fonts wrapped in this class can
be serialized by Weka's XML serialization mechanism.
- Version:
- $Revision: $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetFont()
Get the Font wrapped by this instanceGet the font nameint
Get the font sizeint
Get the font style (see constants in Font class)void
setFontName
(String fontName) Set the font namevoid
setFontSize
(int size) Set the font sizevoid
setFontStyle
(int style) Set the font style (see constants in Font class)
-
Constructor Details
-
FontHelper
Constructor- Parameters:
font
- the font to wrap
-
FontHelper
public FontHelper()No-op constructor (for beans conformity)
-
-
Method Details
-
setFontName
Set the font name- Parameters:
fontName
- the name of the font
-
getFontName
Get the font name- Returns:
- the font name
-
setFontStyle
public void setFontStyle(int style) Set the font style (see constants in Font class)- Parameters:
style
- the style of the font
-
getFontStyle
public int getFontStyle()Get the font style (see constants in Font class)- Returns:
- the style of the font
-
setFontSize
public void setFontSize(int size) Set the font size- Parameters:
size
- the size
-
getFontSize
public int getFontSize()Get the font size- Returns:
- the size
-
getFont
Get the Font wrapped by this instance- Returns:
- the Font object
-