borland.jbcl Packages  borland.jbcl Class Hierarchy  borland.jbcl.control 

FontChooser component

java.lang.Object
   +----borland.jbcl.control.FontChooser

About the FontChooser component

Variables  Constructors  Properties  Methods  Event Listeners

Implements WindowListener, EventListener

The FontChooser component enables the user to specify the font style.

Relationship of the JBCL font chooser classes:


FontChooser variables

Variables implemented in this class

FontChooser constructors

FontChooser properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

FontChooser methods

Methods implemented in this class

Methods implemented in java.lang.Object

FontChooser event listeners


FontChooser variables

CANCEL

  public static final int CANCEL = ButtonDialog.CANCEL

OK

  public static final int OK = ButtonDialog.OK

aList

  protected Array aList

dialog

  protected FontChooserDialog dialog

frame

  protected Frame frame

result

  protected int result

title

  protected String title

value

  protected Font value

FontChooser constructors

FontChooser()

  public FontChooser()
Creates a new font chooser dialog box with frame=null and no title bar text. No initial font is selected.

FontChooser(java.awt.Frame)

  public FontChooser(java.awt.Frame frame)
Creates a new font chooser dialog box, specifying the frame as the parent, with no title bar text. No initial font is selected.

Parameters:

frame
The parent frame for the dialog box.

FontChooser(java.awt.Frame, java.lang.String)

  public FontChooser(java.awt.Frame frame, java.lang.String title)
Creates a new font chooser dialog box using the specified frame and title bar text. No initial font is selected.

Parameters:

frame
The parent frame for the dialog box.
title
The title bar text.

FontChooser(java.awt.Frame, java.lang.String, java.awt.Font)

  public FontChooser(java.awt.Frame frame, java.lang.String title, java.awt.Font value)
Creates a new font chooser dialog. If a frame is specified, the dialog is created using FontChooserDialog.

Parameters:

frame
The parent frame for the dialog box.
title
The title bar text.
value
The active font.

FontChooser properties

frame

 public Frame getFrame()
 public void setFrame(java.awt.Frame frame)
The parent frame for the font chooser dialog box.

result

 public int getResult()
 public void setResult(int i)

The result property stores which button of the dialog box was clicked.

title

 public String getTitle()
 public void setTitle(java.lang.String title)
The title text of the font chooser dialog box, usually shown in the title bar.

value

 public Font getValue()
 public void setValue(java.awt.Font value)
The active font value. Typically, this value determines the font that is initially displayed when the dialog box appears.

visible

 public boolean isVisible()
 public void setVisible(boolean visible)
Makes the dialog box visible.


FontChooser methods

show()

  public void show()
Displays a font chooser dialog box (if the default constructor was invoked), registers itself as a window listener for the dialog box, and shows the dialog.


FontChooser event listeners

This component is a source for the following event sets. For information on the standard AWT event sets, see Standard Java events.

action

 public void addActionListener(java.awt.event.ActionListener l)
 public void removeActionListener(java.awt.event.ActionListener l)