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
FontChooserPanel constructors
FontChooserPanel properties
*Read-only properties **Write-only properties
Properties implemented in this class
FontChooserPanel methods
Methods implemented in this class
- computeVisibleRect(java.awt.Rectangle)
- contains(int, int)
- createToolTip()
- firePropertyChange(java.lang.String, boolean, boolean)
- firePropertyChange(java.lang.String, byte, byte)
- firePropertyChange(java.lang.String, char, char)
- firePropertyChange(java.lang.String, double, double)
- firePropertyChange(java.lang.String, float, float)
- firePropertyChange(java.lang.String, int, int)
- firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
- firePropertyChange(java.lang.String, long, long)
- firePropertyChange(java.lang.String, short, short)
- fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object)
- getActionForKeyStroke(com.sun.java.swing.KeyStroke)
- getBounds(java.awt.Rectangle)
- getClientProperty(java.lang.Object)
- getComponentGraphics(java.awt.Graphics)
- getConditionForKeyStroke(com.sun.java.swing.KeyStroke)
- getLocation(java.awt.Point)
- getSize(java.awt.Dimension)
- getToolTipLocation(java.awt.event.MouseEvent)
- getToolTipText(java.awt.event.MouseEvent)
- grabFocus()
- hasFocus()
- isLightweightComponent(java.awt.Component)
- paint(java.awt.Graphics)
- paintBorder(java.awt.Graphics)
- paintChildren(java.awt.Graphics)
- paintComponent(java.awt.Graphics)
- paintImmediately(int, int, int, int)
- paintImmediately(java.awt.Rectangle)
- processComponentKeyEvent(java.awt.event.KeyEvent)
- processFocusEvent(java.awt.event.FocusEvent)
- processKeyEvent(java.awt.event.KeyEvent)
- processMouseMotionEvent(java.awt.event.MouseEvent)
- putClientProperty(java.lang.Object, java.lang.Object)
- registerKeyboardAction(java.awt.event.ActionListener, com.sun.java.swing.KeyStroke, int)
- registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, com.sun.java.swing.KeyStroke, int)
- removeNotify()
- repaint(java.awt.Rectangle)
- repaint(long, int, int, int, int)
- requestDefaultFocus()
- requestFocus()
- resetKeyboardActions()
- reshape(int, int, int, int)
- revalidate()
- scrollRectToVisible(java.awt.Rectangle)
- setUI(com.sun.java.swing.plaf.ComponentUI)
- unregisterKeyboardAction(com.sun.java.swing.KeyStroke)
- update(java.awt.Graphics)
- updateUI()
- action(java.awt.Event, java.lang.Object)
- add(java.awt.PopupMenu)
- bounds()
- checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver)
- checkImage(java.awt.Image, java.awt.image.ImageObserver)
- contains(java.awt.Point)
- createImage(int, int)
- createImage(java.awt.image.ImageProducer)
- disable()
- disableEvents(long)
- dispatchEvent(java.awt.AWTEvent)
- enable()
- enable(boolean)
- enableEvents(long)
- getFontMetrics(java.awt.Font)
- gotFocus(java.awt.Event, java.lang.Object)
- handleEvent(java.awt.Event)
- hide()
- imageUpdate(java.awt.Image, int, int, int, int, int)
- inside(int, int)
- keyDown(java.awt.Event, int)
- keyUp(java.awt.Event, int)
- list()
- list(java.io.PrintStream)
- list(java.io.PrintWriter)
- location()
- lostFocus(java.awt.Event, java.lang.Object)
- mouseDown(java.awt.Event, int, int)
- mouseDrag(java.awt.Event, int, int)
- mouseEnter(java.awt.Event, int, int)
- mouseExit(java.awt.Event, int, int)
- mouseMove(java.awt.Event, int, int)
- mouseUp(java.awt.Event, int, int)
- move(int, int)
- nextFocus()
- paintAll(java.awt.Graphics)
- postEvent(java.awt.Event)
- prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver)
- prepareImage(java.awt.Image, java.awt.image.ImageObserver)
- printAll(java.awt.Graphics)
- processComponentEvent(java.awt.event.ComponentEvent)
- processMouseEvent(java.awt.event.MouseEvent)
- remove(java.awt.MenuComponent)
- repaint()
- repaint(int, int, int, int)
- repaint(long)
- resize(int, int)
- resize(java.awt.Dimension)
- setBounds(int, int, int, int)
- setLocation(int, int)
- setSize(int, int)
- show()
- show(boolean)
- size()
- toString()
- transferFocus()
- add(java.awt.Component)
- add(java.awt.Component, int)
- add(java.awt.Component, java.lang.Object)
- add(java.awt.Component, java.lang.Object, int)
- add(java.lang.String, java.awt.Component)
- addImpl(java.awt.Component, java.lang.Object, int)
- countComponents()
- deliverEvent(java.awt.Event)
- doLayout()
- getComponent(int)
- getComponentAt(int, int)
- getComponentAt(java.awt.Point)
- insets()
- invalidate()
- isAncestorOf(java.awt.Component)
- layout()
- list(java.io.PrintStream, int)
- list(java.io.PrintWriter, int)
- locate(int, int)
- minimumSize()
- paintComponents(java.awt.Graphics)
- paramString()
- preferredSize()
- print(java.awt.Graphics)
- printComponents(java.awt.Graphics)
- processContainerEvent(java.awt.event.ContainerEvent)
- processEvent(java.awt.AWTEvent)
- remove(int)
- remove(java.awt.Component)
- removeAll()
- validate()
- validateTree()
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:
- Makes the specified font the active font.
- Gets the font list using the default toolkit.
- Highlights the new font if it appears in the font list.
- Displays the font size of the specified new font in the Font Size box.
- Updates the Bold checkbox and Italic checkbox to reflect the specified new font.
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 )