/** * Standard constructor - builds a font chooser dialog owned by another dialog. * * @param owner the dialog that 'owns' this dialog. * @param title the title for the dialog. * @param modal a boolean that indicates whether or not the dialog is modal. * @param font the initial font displayed. */ public FontChooserDialog(final Dialog owner, final String title, final boolean modal, final Font font) { super(owner, title, modal); setContentPane(createContent(font)); }
/** * Returns the panel that is the user interface. * * @param font the font. * * @return the panel. */ private JPanel createContent(Font font) { final JPanel content = new JPanel(new BorderLayout()); content.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); if (font == null) { font = new Font("Dialog", 10, Font.PLAIN); } this.fontChooserPanel = new FontChooserPanel(font); content.add(this.fontChooserPanel); final JPanel buttons = createButtonPanel(); buttons.setBorder(BorderFactory.createEmptyBorder(4, 0, 0, 0)); content.add(buttons, BorderLayout.SOUTH); return content; }
/** * Returns the panel that is the user interface. * * @param font the font. * * @return the panel. */ private JPanel createContent(Font font) { final JPanel content = new JPanel(new BorderLayout()); content.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); if (font == null) { font = new Font("Dialog", 10, Font.PLAIN); } this.fontChooserPanel = new FontChooserPanel(font); content.add(this.fontChooserPanel); final JPanel buttons = createButtonPanel(); buttons.setBorder(BorderFactory.createEmptyBorder(4, 0, 0, 0)); content.add(buttons, BorderLayout.SOUTH); return content; }
/** * Standard constructor - builds a font chooser dialog owned by another dialog. * * @param owner the dialog that 'owns' this dialog. * @param title the title for the dialog. * @param modal a boolean that indicates whether or not the dialog is modal. * @param font the initial font displayed. */ public FontChooserDialog(final Dialog owner, final String title, final boolean modal, final Font font) { super(owner, title, modal); setContentPane(createContent(font)); }
/** * Returns the panel that is the user interface. * * @param font the font. * * @return the panel. */ private JPanel createContent(Font font) { final JPanel content = new JPanel(new BorderLayout()); content.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); if (font == null) { font = new Font("Dialog", 10, Font.PLAIN); } this.fontChooserPanel = new FontChooserPanel(font); content.add(this.fontChooserPanel); final JPanel buttons = createButtonPanel(); buttons.setBorder(BorderFactory.createEmptyBorder(4, 0, 0, 0)); content.add(buttons, BorderLayout.SOUTH); return content; }
/** * Standard constructor - builds a font chooser dialog owned by a frame. * * @param owner the frame that 'owns' this dialog. * @param title the title for the dialog. * @param modal a boolean that indicates whether or not the dialog is modal. * @param font the initial font displayed. */ public FontChooserDialog(final Frame owner, final String title, final boolean modal, final Font font) { super(owner, title, modal); setContentPane(createContent(font)); }
/** * Standard constructor - builds a font chooser dialog owned by another dialog. * * @param owner the dialog that 'owns' this dialog. * @param title the title for the dialog. * @param modal a boolean that indicates whether or not the dialog is modal. * @param font the initial font displayed. */ public FontChooserDialog(final Dialog owner, final String title, final boolean modal, final Font font) { super(owner, title, modal); setContentPane(createContent(font)); }
/** * Standard constructor - builds a font chooser dialog owned by a frame. * * @param owner the frame that 'owns' this dialog. * @param title the title for the dialog. * @param modal a boolean that indicates whether or not the dialog is modal. * @param font the initial font displayed. */ public FontChooserDialog(final Frame owner, final String title, final boolean modal, final Font font) { super(owner, title, modal); setContentPane(createContent(font)); }
/** * Standard constructor - builds a font chooser dialog owned by a frame. * * @param owner the frame that 'owns' this dialog. * @param title the title for the dialog. * @param modal a boolean that indicates whether or not the dialog is modal. * @param font the initial font displayed. */ public FontChooserDialog(final Frame owner, final String title, final boolean modal, final Font font) { super(owner, title, modal); setContentPane(createContent(font)); }