Class SwingFont

java.lang.Object
java.awt.Font
com.jformdesigner.model.SwingFont
All Implemented Interfaces:
SwingResource, Serializable

public class SwingFont extends Font implements SwingResource
Used to specify fonts from the Swing font palette. Invokes UIManager.getFont(key) to get the real font.

This class extends java.awt.Font so that it can be used everywhere, but especially as title font in TitledBorder.

Since:
3.0
See Also:
  • Constructor Details

    • SwingFont

      public SwingFont(String key)
      Constructs a font from the Swing font palette.
      Parameters:
      key - The name of the Swing font.
  • Method Details

    • getKey

      public String getKey()
      Returns The name of the Swing font.
    • equals

      public boolean equals(Object obj)
      Determines whether another object is equal to this object.
      Overrides:
      equals in class Font
    • hashCode

      public int hashCode()
      Returns the hash code for this object.
      Overrides:
      hashCode in class Font
    • toString

      public String toString()
      Returns a string representation of the object.
      Overrides:
      toString in class Font