public final class StandardFontSource extends java.lang.Object implements FontSource, java.io.Serializable
FontSource interface.
| Constructor and Description |
|---|
StandardFontSource()
Creates a new instance with default fonts.
|
StandardFontSource(java.awt.Font defaultFont)
Creates a new font source with the specified default font.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Tests this paint source for equality with an arbitrary object.
|
java.awt.Font |
getDefaultFont()
Returns the default font.
|
java.awt.Font |
getFont(java.lang.Comparable<?> key)
Returns the font for the specified key.
|
void |
setDefaultFont(java.awt.Font font)
Sets the default font.
|
void |
setFont(java.lang.Comparable<?> key,
java.awt.Font font)
Sets the font associated with the specified key.
|
void |
style(java.awt.Font font)
Clears existing font settings and sets the default font to the
supplied value.
|
public StandardFontSource()
public StandardFontSource(java.awt.Font defaultFont)
defaultFont - the default font (null not permitted).public java.awt.Font getDefaultFont()
DEFAULT_FONT.null).public void setDefaultFont(java.awt.Font font)
font - the font (null not permitted).public java.awt.Font getFont(java.lang.Comparable<?> key)
getFont in interface FontSourcekey - the key (null not permitted).null).public void setFont(java.lang.Comparable<?> key, java.awt.Font font)
setFont in interface FontSourcekey - the key (null not permitted).font - the font (null permitted).public void style(java.awt.Font font)
style in interface FontSourcefont - the font (null not permitted).public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object (null permitted).