Package com.orsonpdf
Class FontKey
- java.lang.Object
-
- com.orsonpdf.FontKey
-
public class FontKey extends java.lang.Object
A key to represent a Java2D font. This is used to maintain a mapping between Java2D fonts and PDF fonts.
-
-
Constructor Summary
Constructors Constructor Description FontKey(java.lang.String name, boolean bold, boolean italic)
Creates a new font key.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FontKey
createFontKey(java.awt.Font f)
Creates a new key for a given font.boolean
equals(java.lang.Object obj)
Tests this key for equality with an arbitrary object.int
hashCode()
Returns a hash code for this instance.java.lang.String
toString()
Returns a string representation of this instance, primarily for debugging purposes.
-
-
-
Constructor Detail
-
FontKey
public FontKey(java.lang.String name, boolean bold, boolean italic)
Creates a new font key.- Parameters:
name
- the name.bold
- the bold flag.italic
- the italic flag.- See Also:
createFontKey(java.awt.Font)
-
-
Method Detail
-
createFontKey
public static FontKey createFontKey(java.awt.Font f)
Creates a new key for a given font.- Parameters:
f
- the font (null
not permitted).- Returns:
- The font key.
-
equals
public boolean equals(java.lang.Object obj)
Tests this key for equality with an arbitrary object.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- the object to test against (null
permitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code for this instance.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- A hash code.
-
toString
public java.lang.String toString()
Returns a string representation of this instance, primarily for debugging purposes.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string.
-
-