Class FontChooser

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class FontChooser extends DialogWithButtons
A font selection dialog.
Version:
$Revision$
Author:
FracPete (fracpete at waikato dot ac dot nz)
See Also:
  • Field Details

    • m_FontPanel

      protected FontChooserPanelWithPreview m_FontPanel
      the panel for selecting the font.
    • m_ButtonOK

      protected JButton m_ButtonOK
      the OK button.
    • m_ButtonCancel

      protected JButton m_ButtonCancel
      the Cancel button.
    • m_Current

      protected Font m_Current
      The font the user has chosen.
  • Constructor Details

    • FontChooser

      public FontChooser(Frame owner)
      Construct a FontChooser.
      Parameters:
      owner - the parent frame
    • FontChooser

      public FontChooser(Dialog owner)
      Construct a FontChooser.
      Parameters:
      owner - the parent dialog
  • Method Details

    • initGUI

      protected void initGUI()
      Initializes the widgets.
      Overrides:
      initGUI in class DialogWithButtons
    • finishInit

      protected void finishInit()
      finishes the initialization, by setting size/location.
      Overrides:
      finishInit in class BaseDialog
    • setCurrent

      public void setCurrent(Font value)
      Sets the selected font. If null is provided, the default font/size will be used.
      Parameters:
      value - the font, can be null
    • getCurrent

      public Font getCurrent()
      Retrieve the selected font, or null.
      Returns:
      the selected font
    • main

      public static void main(String[] args)
      Simple main program to start it running.
      Parameters:
      args - ignored