public class VisualFont extends AbstractVisualObject
VisualFont
class represents a font as a
button with the name of the font. When the button is
pressed, a FontChooser
appears that allows the user
to select a new font.VALUE_PROPERTY
Constructor and Description |
---|
VisualFont(java.awt.Font font)
Creates a new visual font object using the specified font.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Component |
getComponent()
Gets the button used to represent the font.
|
static java.lang.String |
getFontDescription(java.awt.Font font)
Gets a font description.
|
java.lang.Object |
getValue()
Gets the font value.
|
static void |
main(java.lang.String[] argv)
Tests this class.
|
addPropertyChangeListener, firePropertyChange, firePropertyChange, hasChooser, refreshComponent, setRestrictions, showChooser
public VisualFont(java.awt.Font font)
public java.awt.Component getComponent()
public static java.lang.String getFontDescription(java.awt.Font font)
public java.lang.Object getValue()
public static void main(java.lang.String[] argv)
argv
- the array of command line parameters.