superwaba.ext.xplat.io.print
Class Font
java.lang.Object
|
+--superwaba.ext.xplat.io.print.Font
- public class Font
- extends Object
This class represents a printer font. It has the same attributes of the original
waba.fx.Font, but it works in a different way. It also has two more attributes to
be used only in supported printers: ITALIC and UNDERLINE.
Field Summary |
static int |
BOLD
A bold font style. |
static int |
ITALIC
An italic font style. |
static int |
PLAIN
A plain font style. |
static int |
UNDERLINE
An underline font style. |
Constructor Summary |
Font(String name,
int style,
int size)
Creates a font of the given name, style and size. |
Method Summary |
String |
getName()
Returns the name of the font. |
int |
getSize()
Returns the size of the font. |
int |
getStyle()
Returns the style of the font. |
PLAIN
public static final int PLAIN
- A plain font style. May be ORed with ITALIC and/or UNDERLINE.
BOLD
public static final int BOLD
- A bold font style. May be ORed with ITALIC and/or UNDERLINE.
ITALIC
public static final int ITALIC
- An italic font style.
UNDERLINE
public static final int UNDERLINE
- An underline font style.
Font
public Font(String name,
int style,
int size)
- Creates a font of the given name, style and size. Font styles are defined
in this class.
- See Also:
PLAIN
,
BOLD
,
ITALIC
,
UNDERLINE
,
Graphics
getName
public String getName()
- Returns the name of the font.
getSize
public int getSize()
- Returns the size of the font.
getStyle
public int getStyle()
- Returns the style of the font. Font styles are defined in this class.
- See Also:
PLAIN
,
BOLD