Package org.jfree.ui

Class FontChooserDialog

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

public class FontChooserDialog extends StandardDialog
A dialog for choosing a font from the available system fonts.
See Also:
  • Field Details

    • fontChooserPanel

      private FontChooserPanel fontChooserPanel
      The panel within the dialog that contains the font selection controls.
  • Constructor Details

    • FontChooserDialog

      public FontChooserDialog(Dialog owner, String title, boolean modal, Font font)
      Standard constructor - builds a font chooser dialog owned by another dialog.
      Parameters:
      owner - the dialog that 'owns' this dialog.
      title - the title for the dialog.
      modal - a boolean that indicates whether or not the dialog is modal.
      font - the initial font displayed.
    • FontChooserDialog

      public FontChooserDialog(Frame owner, String title, boolean modal, Font font)
      Standard constructor - builds a font chooser dialog owned by a frame.
      Parameters:
      owner - the frame that 'owns' this dialog.
      title - the title for the dialog.
      modal - a boolean that indicates whether or not the dialog is modal.
      font - the initial font displayed.
  • Method Details

    • getSelectedFont

      public Font getSelectedFont()
      Returns the selected font.
      Returns:
      the font.
    • createContent

      private JPanel createContent(Font font)
      Returns the panel that is the user interface.
      Parameters:
      font - the font.
      Returns:
      the panel.