GrammarScope  4.0.0
Public Member Functions | Protected Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
grammarscope.browser.dialog.FontChooserDialog Class Reference
Inheritance diagram for grammarscope.browser.dialog.FontChooserDialog:
Inheritance graph
[legend]
Collaboration diagram for grammarscope.browser.dialog.FontChooserDialog:
Collaboration graph
[legend]

Public Member Functions

 FontChooserDialog (final Frame owner, final Font font, final Color color)
 
Font getSelectedFont ()
 
Color getSelectedColor ()
 
boolean isOk ()
 
void setVisible (final boolean show)
 

Protected Member Functions

void update ()
 
void updatePreviewFont ()
 
void updatePreviewColor ()
 
void ok ()
 
void cancel ()
 

Static Private Member Functions

static JSpinner makeSizeSpinner ()
 
static JComboBox< String > makeNameComboBox ()
 

Private Attributes

final JColorChooser colorChooser
 
final JComboBox< String > fontNameComboBox
 
final JCheckBox boldCheckBox
 
final JCheckBox italicCheckBox
 
final JSpinner fontSizeSpinner
 
final JLabel previewLabel
 
Font font
 
String name
 
int size
 
boolean isBold
 
boolean isItalic
 
Color color
 
boolean ok
 

Static Private Attributes

static final long serialVersionUID = 1L
 

Detailed Description

Font chooser

Author
Bernard Bou

Constructor & Destructor Documentation

◆ FontChooserDialog()

grammarscope.browser.dialog.FontChooserDialog.FontChooserDialog ( final Frame  owner,
final Font  font,
final Color  color 
)

Constructor

Parameters
ownerparent frame owner
fontfont
colorcolor

Member Function Documentation

◆ cancel()

void grammarscope.browser.dialog.FontChooserDialog.cancel ( )
protected

Cancel command handler

◆ getSelectedColor()

Color grammarscope.browser.dialog.FontChooserDialog.getSelectedColor ( )

Get font color

Returns
selected color

◆ getSelectedFont()

Font grammarscope.browser.dialog.FontChooserDialog.getSelectedFont ( )

Get font

Returns
selected font

◆ isOk()

boolean grammarscope.browser.dialog.FontChooserDialog.isOk ( )

Get ok pressed status

Returns
ok pressed status

◆ makeNameComboBox()

static JComboBox<String> grammarscope.browser.dialog.FontChooserDialog.makeNameComboBox ( )
staticprivate

Make font name combobox

Returns
font name combobox

◆ makeSizeSpinner()

static JSpinner grammarscope.browser.dialog.FontChooserDialog.makeSizeSpinner ( )
staticprivate

Make font size spinner

Returns
spinner

◆ ok()

void grammarscope.browser.dialog.FontChooserDialog.ok ( )
protected

Ok command handler

◆ setVisible()

void grammarscope.browser.dialog.FontChooserDialog.setVisible ( final boolean  show)

◆ update()

void grammarscope.browser.dialog.FontChooserDialog.update ( )
protected

Update display. Make a new font for the preview label

◆ updatePreviewColor()

void grammarscope.browser.dialog.FontChooserDialog.updatePreviewColor ( )
protected

Update preview color. get the appropriate color from chooser and update the preview label

◆ updatePreviewFont()

void grammarscope.browser.dialog.FontChooserDialog.updatePreviewFont ( )
protected

Update preview font. Get the appropriate font and update the preview label

Member Data Documentation

◆ boldCheckBox

final JCheckBox grammarscope.browser.dialog.FontChooserDialog.boldCheckBox
private

Bold checkbox

◆ color

Color grammarscope.browser.dialog.FontChooserDialog.color
private

Font color

◆ colorChooser

final JColorChooser grammarscope.browser.dialog.FontChooserDialog.colorChooser
private

Color chooser

◆ font

Font grammarscope.browser.dialog.FontChooserDialog.font
private

Font

◆ fontNameComboBox

final JComboBox<String> grammarscope.browser.dialog.FontChooserDialog.fontNameComboBox
private

Font name combobox

◆ fontSizeSpinner

final JSpinner grammarscope.browser.dialog.FontChooserDialog.fontSizeSpinner
private

Font size spinner

◆ isBold

boolean grammarscope.browser.dialog.FontChooserDialog.isBold
private

Bold flag

◆ isItalic

boolean grammarscope.browser.dialog.FontChooserDialog.isItalic
private

Italic flag

◆ italicCheckBox

final JCheckBox grammarscope.browser.dialog.FontChooserDialog.italicCheckBox
private

Italic checkbox

◆ name

String grammarscope.browser.dialog.FontChooserDialog.name
private

Font name

◆ ok

boolean grammarscope.browser.dialog.FontChooserDialog.ok
private

Whether ok button was pressed

◆ previewLabel

final JLabel grammarscope.browser.dialog.FontChooserDialog.previewLabel
private

Preview label

◆ serialVersionUID

final long grammarscope.browser.dialog.FontChooserDialog.serialVersionUID = 1L
staticprivate

◆ size

int grammarscope.browser.dialog.FontChooserDialog.size
private

Font size


The documentation for this class was generated from the following file: