borland Packages  Class Hierarchy  jbcl.control Package  Index 

FontChooserPanel component

java.lang.Object
   +----java.awt.Component
           +----java.awt.Container
                   +----com.sun.java.swing.JComponent
                           +----borland.jbcl.control.FontChooserPanel

About the FontChooserPanel component

Variables  Constructors  Properties  Methods  Event Listeners

Implements ItemListener, KeyListener, ImageObserver, MenuContainer, Serializable, EventListener

FontChooserPanel is a component that enables the user to select a font and a style. It is used by the FontChooserDialog, which in turn is used by the FontChooser component.

You can use FontChooserPanel to create your own font dialog boxes. The panel includes a list that displays all the available fonts on the system and from which the user selects the desired font, a text field for specifying a size for the font, bold and italics check boxes, and a preview field that displays how the selected font, size, and style appears.


FontChooserPanel variables

Variables implemented in com.sun.java.swing.JComponent

Variables implemented in java.awt.Component

FontChooserPanel constructors

FontChooserPanel properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in com.sun.java.swing.JComponent

Properties implemented in java.awt.Component

Properties implemented in java.awt.Container

Properties implemented in java.lang.Object

FontChooserPanel methods

Methods implemented in this class

Methods implemented in com.sun.java.swing.JComponent

Methods implemented in java.awt.Component

Methods implemented in java.awt.Container

Methods implemented in java.lang.Object

FontChooserPanel event listeners


FontChooserPanel constructors

FontChooserPanel()

  public FontChooserPanel()
Creates a FontChooserPanel with no font initially selected.

FontChooserPanel(java.awt.Font)

  public FontChooserPanel(java.awt.Font font)
Creates a FontChooserPanel with the specified font initially selected.

Parameters:

font
The selected font.


FontChooserPanel properties

changed

 public boolean isChanged()
Determines whether the font selected is different than the font that was selected when the dialog box initially opened. If changed is true, the font has changed.

fontValue

 public Font getFontValue()
 public void setFontValue(java.awt.Font font)
The font value selected in the FontChooserPanel.

Parameters:

value
The Font object that contains the font, size, and style of the currently selected font.

preferredSize

 public Dimension getPreferredSize()
The preferredSize property is the preferred size of the font chooser dialog box. The preferred size is used by the layout managers to stretch out the scrollbars to a usable size.


FontChooserPanel methods

addNotify()

  public void addNotify()

Overrides: com.sun.java.swing.JComponent.addNotify()

changeFont(java.awt.Font)

  protected void changeFont(java.awt.Font font)
Calls changeFont(java.awt.Font, boolean, boolean) without suppressing the updating and display of the font list and font size box as the specified font becomes the new selected font.

Parameters:

font
The new font to change to.

changeFont(java.awt.Font, boolean, boolean)

  protected void changeFont(java.awt.Font font, boolean suppressList, boolean suppressText)
This method does the following:

Parameters:

font
The new font to change to.
suppressList
Whether to suppress the updating and display of the font list. If true, the updating and display is suppressed.
suppressText
Whether to suppress the updating and display of the font size box. If true, the updating and display is suppressed.

fontChanged(java.awt.Font)

  protected void fontChanged(java.awt.Font newFont)
Sets the changed property to true.

Parameters:

newFont
The new font to change to.


FontChooserPanel event listeners

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

ancestor

 public void addAncestorListener(com.sun.java.swing.event.AncestorListener )
 public void removeAncestorListener(com.sun.java.swing.event.AncestorListener )

component

 public synchronized void addComponentListener(java.awt.event.ComponentListener )
 public synchronized void removeComponentListener(java.awt.event.ComponentListener )

container

 public synchronized void addContainerListener(java.awt.event.ContainerListener )
 public void removeContainerListener(java.awt.event.ContainerListener )

focus

 public synchronized void addFocusListener(java.awt.event.FocusListener )
 public synchronized void removeFocusListener(java.awt.event.FocusListener )

key

 public synchronized void addKeyListener(java.awt.event.KeyListener )
 public synchronized void removeKeyListener(java.awt.event.KeyListener )

mouse

 public synchronized void addMouseListener(java.awt.event.MouseListener )
 public synchronized void removeMouseListener(java.awt.event.MouseListener )

mouseMotion

 public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener )
 public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener )

propertyChange

 public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener )
 public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener )

vetoableChange

 public synchronized void addVetoableChangeListener(java.beans.VetoableChangeListener )
 public synchronized void removeVetoableChangeListener(java.beans.VetoableChangeListener )