public interface FontSelectionModel
Font
.Font
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener listener)
Adds
listener as a listener to changes in the model. |
List<String> |
getAvailableFontNames()
Gets the available font names.
|
Font |
getSelectedFont()
Returns the selected
Font which should be
non-null . |
void |
removeChangeListener(ChangeListener listener)
Removes
listener as a listener to changes in the model. |
void |
setSelectedFont(Font font)
Sets the selected font to
font . |
Font getSelectedFont()
Font
which should be
non-null
.Font
setSelectedFont(java.awt.Font)
void setSelectedFont(Font font)
font
.
Note that setting the font to null
is undefined and may have unpredictable results.
This method fires a state changed event if it sets the
current font to a new non-null
font.font
- the new Font
getSelectedFont()
,
addChangeListener(javax.swing.event.ChangeListener)
List<String> getAvailableFontNames()
GraphicsEnvironment
localized for the default locale,
as returned by Locale.getDefault()
.void addChangeListener(ChangeListener listener)
listener
as a listener to changes in the model.listener
- the ChangeListener
to be addedvoid removeChangeListener(ChangeListener listener)
listener
as a listener to changes in the model.listener
- the ChangeListener
to be removed