Module org.jfree.chart3d
Package org.jfree.chart3d.plot
Class StandardFontSource<K extends Comparable<K>>
java.lang.Object
org.jfree.chart3d.plot.StandardFontSource<K>
- All Implemented Interfaces:
Serializable
,FontSource<K>
public final class StandardFontSource<K extends Comparable<K>>
extends Object
implements FontSource<K>, Serializable
A standard implementation of the
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
FontSource
interface.
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance with default fonts.StandardFontSource
(Font defaultFont) Creates a new font source with the specified default font. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests this paint source for equality with an arbitrary object.Returns the default font.Returns the font for the specified key.void
setDefaultFont
(Font font) Sets the default font.void
Sets the font associated with the specified key.void
Clears existing font settings and sets the default font to the supplied value.
-
Constructor Details
-
StandardFontSource
public StandardFontSource()Creates a new instance with default fonts. -
StandardFontSource
Creates a new font source with the specified default font.- Parameters:
defaultFont
- the default font (null
not permitted).
-
-
Method Details
-
getDefaultFont
Returns the default font. The default value isDEFAULT_FONT
.- Returns:
- The default font (never
null
).
-
setDefaultFont
Sets the default font.- Parameters:
font
- the font (null
not permitted).
-
getFont
Returns the font for the specified key.- Specified by:
getFont
in interfaceFontSource<K extends Comparable<K>>
- Parameters:
key
- the key (null
not permitted).- Returns:
- The font (never
null
).
-
setFont
Sets the font associated with the specified key.- Specified by:
setFont
in interfaceFontSource<K extends Comparable<K>>
- Parameters:
key
- the key (null
not permitted).font
- the font (null
permitted).
-
style
Clears existing font settings and sets the default font to the supplied value. This method is used by the framework and is not normally called by client code.- Specified by:
style
in interfaceFontSource<K extends Comparable<K>>
- Parameters:
font
- the font (null
not permitted).- Since:
- 1.2
-
equals
Tests this paint source for equality with an arbitrary object.
-