Class FontChooserPanelWithPreview

    • Field Detail

      • FONT_SIZES

        public static final Integer[] FONT_SIZES
        The list of font sizes.
      • DEFAULT_SIZE

        public static final Integer DEFAULT_SIZE
        The index of the default size.
      • m_Current

        protected Font m_Current
        The font the user has chosen.
      • m_ListFontName

        protected JList m_ListFontName
        The font name chooser.
      • m_ModelFontName

        protected DefaultListModel m_ModelFontName
        The font name chooser model.
      • m_ListFontSize

        protected JList m_ListFontSize
        The font size chooser.
      • m_CheckBoxBold

        protected BaseCheckBox m_CheckBoxBold
        The bold chooser.
      • m_CheckBoxItalic

        protected BaseCheckBox m_CheckBoxItalic
        The italic chooser.
      • m_TextSample

        protected BaseTextArea m_TextSample
        The display area.
      • m_IgnoreUpdates

        protected boolean m_IgnoreUpdates
        whether to ignore updates in the GUI temporarily.
    • Constructor Detail

      • FontChooserPanelWithPreview

        public FontChooserPanelWithPreview()
    • Method Detail

      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class BasePanel
      • createFont

        protected Font createFont()
        Determines the font based on the current settings and returns it.
        Returns:
        the generate font
      • previewFont

        protected void previewFont()
        Called from the action handlers to get the font info, build a font, and set it.
      • 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
        See Also:
        DEFAULT_FONT, DEFAULT_SIZE
      • 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