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 TypeMethodDescriptionbooleanTests this paint source for equality with an arbitrary object.Returns the default font.Returns the font for the specified key.voidsetDefaultFont(Font font) Sets the default font.voidSets the font associated with the specified key.voidClears 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 (nullnot 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 (nullnot permitted).
-
getFont
Returns the font for the specified key.- Specified by:
getFontin interfaceFontSource<K extends Comparable<K>>- Parameters:
key- the key (nullnot permitted).- Returns:
- The font (never
null).
-
setFont
Sets the font associated with the specified key.- Specified by:
setFontin interfaceFontSource<K extends Comparable<K>>- Parameters:
key- the key (nullnot permitted).font- the font (nullpermitted).
-
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:
stylein interfaceFontSource<K extends Comparable<K>>- Parameters:
font- the font (nullnot permitted).- Since:
- 1.2
-
equals
Tests this paint source for equality with an arbitrary object.
-