javax.swing.text
Class StyleContext.FontKey
java.lang.Object
javax.swing.text.StyleContext.FontKey
- Enclosing class:
- StyleContext
- static class StyleContext.FontKey
- extends Object
key for a font table
Method Summary |
boolean |
equals(Object obj)
Compares this object to the specifed object.
|
int |
hashCode()
Returns a hashcode for this font. |
void |
setValue(String family,
int style,
int size)
|
family
private String family
style
private int style
size
private int size
StyleContext.FontKey
public StyleContext.FontKey(String family,
int style,
int size)
- Constructs a font key.
setValue
public void setValue(String family,
int style,
int size)
hashCode
public int hashCode()
- Returns a hashcode for this font.
- Overrides:
hashCode
in class Object
- Returns:
- a hashcode value for this font.
- See Also:
Object.equals(java.lang.Object)
,
Hashtable
equals
public boolean equals(Object obj)
- Compares this object to the specifed object.
The result is
true
if and only if the argument is not
null
and is a Font
object with the same
name, style, and point size as this font.
- Overrides:
equals
in class Object
- Parameters:
obj
- the object to compare this font with.
- Returns:
true
if the objects are equal;
false
otherwise.- See Also:
Object.hashCode()
,
Hashtable