Package com.starpoints.graphics
Class Font
- java.lang.Object
-
- com.starpoints.graphics.Font
-
public final class Font extends java.lang.ObjectPlatform independent Font.
-
-
Field Summary
Fields Modifier and Type Field Description static intBOLDStyle Constant for bold font.static intCOURIERName Constant for Courier font.static FontCOURIER_10A Courier font with a size of 10.static FontCOURIER_12A Courier font with a size of 12.static FontCOURIER_14A Courier font with a size of 14.static FontCOURIER_16A Courier font with a size of 16.static FontCOURIER_20A Courier font with a size of 20.static FontCOURIER_24A Courier font with a size of 24.static FontCOURIER_28A Courier font with a size of 28.static FontCOURIER_30A Courier font with a size of 30.static FontCOURIER_60A Courier font with a size of 60.static FontCOURIER_8A Courier font with a size of 8.static intDIALOGName Constant for Dialog font.static FontDIALOG_10A Dialog font with a size of 10.static FontDIALOG_10PA plain Dialog font with a size of 10.static FontDIALOG_11A Dialog font with a size of 11.static FontDIALOG_12A Dialog font with a size of 12.static FontDIALOG_14A Dialog font with a size of 14.static FontDIALOG_16A Dialog font with a size of 16.static FontDIALOG_18A Dialog font with a size of 18.static FontDIALOG_20A Dialog font with a size of 20.static FontDIALOG_24A Dialog font with a size of 24.static FontDIALOG_28A Dialog font with a size of 28.static FontDIALOG_30A Dialog font with a size of 30.static FontDIALOG_36A Dialog font with a size of 30.static FontDIALOG_40A Dialog font with a size of 40.static FontDIALOG_48A Dialog font with a size of 48.static FontDIALOG_60A Dialog font with a size of 60.static FontDIALOG_72A Dialog font with a size of 72.static FontDIALOG_8A Dialog font with a size of 8.static intITALICStyle Constant for italic font.static intPLAINStyle Constant for plain font.static intTIMESName Constant for Times Roman font.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FontgetFont(int name, int style, int size)Gets a new Font for given name, style and size.java.lang.StringgetName()FontgetScaledFont(double factor)Creates a scaled font with this fonts name and style.intgetSize()intgetStyle()
-
-
-
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.
-
-