Package com.orsonpdf
Class FontKey
- java.lang.Object
-
- com.orsonpdf.FontKey
-
public class FontKey extends java.lang.ObjectA 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 FontKeycreateFontKey(java.awt.Font f)Creates a new key for a given font.booleanequals(java.lang.Object obj)Tests this key for equality with an arbitrary object.inthashCode()Returns a hash code for this instance.java.lang.StringtoString()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 (nullnot permitted).- Returns:
- The font key.
-
equals
public boolean equals(java.lang.Object obj)
Tests this key for equality with an arbitrary object.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object to test against (nullpermitted).- Returns:
- A boolean.
-
hashCode
public int hashCode()
Returns a hash code for this instance.- Overrides:
hashCodein 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:
toStringin classjava.lang.Object- Returns:
- A string.
-
-