Package mars.venus

Class AbstractFontSettingDialog

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

public abstract class AbstractFontSettingDialog extends JDialog
Abstract class for a font selection dialog.
See Also:
  • Field Details

    • gui

      protected VenusUI gui
    • currentFont

      protected Font currentFont
    • defaultButton

      protected JButton defaultButton
  • Constructor Details

    • AbstractFontSettingDialog

      public AbstractFontSettingDialog(VenusUI gui, String title, boolean modality, Font currentFont)
      Create a new font chooser. Has pertinent JDialog parameters. Will do everything except make it visible.
  • Method Details

    • buildDialogPanel

      protected JPanel buildDialogPanel()
      Build the dialog area, not including control buttons at bottom.
    • buildControlPanel

      protected abstract Component buildControlPanel()
      Build component containing the buttons for dialog control such as OK, Cancel, Reset, Apply, etc. These may vary by application.
    • getFont

      public Font getFont()
      Specified by:
      getFont in interface MenuContainer
      Overrides:
      getFont in class Component
    • performApply

      protected void performApply()
      User has clicked Apply or OK button.
    • closeDialog

      protected void closeDialog()
      We're finished with this modal dialog.
    • reset

      protected void reset()
      Reset font to its initial setting
    • apply

      protected abstract void apply(Font font)
      Apply the given font. Left for the client to define.
      Parameters:
      font - a font to be applied by the client.