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 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 Details

    • StandardFontSource

      Creates a new instance with default fonts.
    • StandardFontSource

      public StandardFontSource(Font defaultFont)
      Creates a new font source with the specified default font.
      Parameters:
      defaultFont - the default font (null not permitted).
  • Method Details

    • getDefaultFont

      public Font getDefaultFont()
      Returns the default font. The default value is DEFAULT_FONT.
      Returns:
      The default font (never null).
    • setDefaultFont

      public void setDefaultFont(Font font)
      Sets the default font.
      Parameters:
      font - the font (null not permitted).
    • getFont

      public Font getFont(K key)
      Returns the font for the specified key.
      Specified by:
      getFont in interface FontSource<K extends Comparable<K>>
      Parameters:
      key - the key (null not permitted).
      Returns:
      The font (never null).
    • setFont

      public void setFont(K key, Font font)
      Sets the font associated with the specified key.
      Specified by:
      setFont in interface FontSource<K extends Comparable<K>>
      Parameters:
      key - the key (null not permitted).
      font - the font (null permitted).
    • style

      public void style(Font font)
      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 interface FontSource<K extends Comparable<K>>
      Parameters:
      font - the font (null not permitted).
      Since:
      1.2
    • equals

      public boolean equals(Object obj)
      Tests this paint source for equality with an arbitrary object.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object (null permitted).
      Returns:
      A boolean.