Class VisualFont

All Implemented Interfaces:
ComponentProducer, VisualObject

public class VisualFont extends AbstractVisualObject
The VisualFont class represents a font as a button with the name of the font. When the button is pressed, a FontChooser appears that allows the user to select a new font.
Since:
3.1.7
Author:
Peter Hollemans
  • Constructor Details

    • VisualFont

      public VisualFont(Font font)
      Creates a new visual font object using the specified font.
  • Method Details

    • getComponent

      public Component getComponent()
      Gets the button used to represent the font.
    • getFontDescription

      public static String getFontDescription(Font font)
      Gets a font description.
    • getValue

      public Object getValue()
      Gets the font value.
      Returns:
      the value that this visual object currently holds.
    • main

      public static void main(String[] argv)
      Tests this class.
      Parameters:
      argv - the array of command line parameters.