Class Font


  • public final class Font
    extends java.lang.Object
    Platform independent Font.
    • Field Detail

      • 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_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.