Package com.starpoints.graphics
Class Font
- java.lang.Object
-
- com.starpoints.graphics.Font
-
public final class Font extends java.lang.Object
Platform independent Font.
-
-
Field Summary
Fields Modifier and Type Field Description static int
BOLD
Style Constant for bold font.static int
COURIER
Name Constant for Courier font.static Font
COURIER_10
A Courier font with a size of 10.static Font
COURIER_12
A Courier font with a size of 12.static Font
COURIER_14
A Courier font with a size of 14.static Font
COURIER_16
A Courier font with a size of 16.static Font
COURIER_20
A Courier font with a size of 20.static Font
COURIER_24
A Courier font with a size of 24.static Font
COURIER_28
A Courier font with a size of 28.static Font
COURIER_30
A Courier font with a size of 30.static Font
COURIER_60
A Courier font with a size of 60.static Font
COURIER_8
A Courier font with a size of 8.static int
DIALOG
Name Constant for Dialog font.static Font
DIALOG_10
A Dialog font with a size of 10.static Font
DIALOG_10P
A plain Dialog font with a size of 10.static Font
DIALOG_11
A Dialog font with a size of 11.static Font
DIALOG_12
A Dialog font with a size of 12.static Font
DIALOG_14
A Dialog font with a size of 14.static Font
DIALOG_16
A Dialog font with a size of 16.static Font
DIALOG_18
A Dialog font with a size of 18.static Font
DIALOG_20
A Dialog font with a size of 20.static Font
DIALOG_24
A Dialog font with a size of 24.static Font
DIALOG_28
A Dialog font with a size of 28.static Font
DIALOG_30
A Dialog font with a size of 30.static Font
DIALOG_36
A Dialog font with a size of 30.static Font
DIALOG_40
A Dialog font with a size of 40.static Font
DIALOG_48
A Dialog font with a size of 48.static Font
DIALOG_60
A Dialog font with a size of 60.static Font
DIALOG_72
A Dialog font with a size of 72.static Font
DIALOG_8
A Dialog font with a size of 8.static int
ITALIC
Style Constant for italic font.static int
PLAIN
Style Constant for plain font.static int
TIMES
Name Constant for Times Roman font.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Font
getFont(int name, int style, int size)
Gets a new Font for given name, style and size.java.lang.String
getName()
Font
getScaledFont(double factor)
Creates a scaled font with this fonts name and style.int
getSize()
int
getStyle()
-
-
-
Field Detail
-
PLAIN
public static final int PLAIN
Style Constant for plain font.- See Also:
- Constant Field Values
-
BOLD
public static final int BOLD
Style Constant for bold font.- See Also:
- Constant Field Values
-
ITALIC
public static final int ITALIC
Style Constant for italic font.- See Also:
- Constant Field Values
-
TIMES
public static final int TIMES
Name Constant for Times Roman font.- See Also:
- Constant Field Values
-
COURIER
public static final int COURIER
Name Constant for Courier font.- See Also:
- Constant Field Values
-
DIALOG
public static final int DIALOG
Name Constant for Dialog font.- See Also:
- Constant Field Values
-
DIALOG_8
public static final Font DIALOG_8
A Dialog font with a size of 8.
-
DIALOG_10
public static final Font DIALOG_10
A Dialog font with a size of 10.
-
DIALOG_11
public static final Font DIALOG_11
A Dialog font with a size of 11.
-
DIALOG_12
public static final Font DIALOG_12
A Dialog font with a size of 12.
-
DIALOG_14
public static final Font DIALOG_14
A Dialog font with a size of 14.
-
DIALOG_16
public static final Font DIALOG_16
A Dialog font with a size of 16.
-
DIALOG_18
public static final Font DIALOG_18
A Dialog font with a size of 18.
-
DIALOG_20
public static final Font DIALOG_20
A Dialog font with a size of 20.
-
DIALOG_24
public static final Font DIALOG_24
A Dialog font with a size of 24.
-
DIALOG_28
public static final Font DIALOG_28
A Dialog font with a size of 28.
-
DIALOG_30
public static final Font DIALOG_30
A Dialog font with a size of 30.
-
DIALOG_36
public static final Font DIALOG_36
A Dialog font with a size of 30.
-
DIALOG_40
public static final Font DIALOG_40
A Dialog font with a size of 40.
-
DIALOG_48
public static final Font DIALOG_48
A Dialog font with a size of 48.
-
DIALOG_60
public static final Font DIALOG_60
A Dialog font with a size of 60.
-
DIALOG_72
public static final Font DIALOG_72
A Dialog font with a size of 72.
-
DIALOG_10P
public static final Font DIALOG_10P
A plain Dialog font with a size of 10.
-
COURIER_8
public static final Font COURIER_8
A Courier font with a size of 8.
-
COURIER_10
public static final Font COURIER_10
A Courier font with a size of 10.
-
COURIER_12
public static final Font COURIER_12
A Courier font with a size of 12.
-
COURIER_14
public static final Font COURIER_14
A Courier font with a size of 14.
-
COURIER_16
public static final Font COURIER_16
A Courier font with a size of 16.
-
COURIER_20
public static final Font COURIER_20
A Courier font with a size of 20.
-
COURIER_24
public static final Font COURIER_24
A Courier font with a size of 24.
-
COURIER_28
public static final Font COURIER_28
A Courier font with a size of 28.
-
COURIER_30
public static final Font COURIER_30
A Courier font with a size of 30.
-
COURIER_60
public static final Font COURIER_60
A Courier font with a size of 60.
-
-
Method Detail
-
getFont
public static Font getFont(int name, int style, int size)
Gets a new Font for given name, style and size.- Parameters:
name
- The Font name.style
- The Font style.size
- The Font size.- Returns:
- The font.
-
getName
public java.lang.String getName()
- Returns:
- the name
-
getSize
public int getSize()
- Returns:
- the size
-
getStyle
public int getStyle()
- Returns:
- the style
-
getScaledFont
public Font getScaledFont(double factor)
Creates a scaled font with this fonts name and style.- Parameters:
factor
- The scaling factor.- Returns:
- The scaled font.
-
-