javax.swing.text
Class StyleContext.FontKey

java.lang.Object
  extended byjavax.swing.text.StyleContext.FontKey
Enclosing class:
StyleContext

static class StyleContext.FontKey
extends Object

key for a font table


Field Summary
private  String family
           
private  int size
           
private  int style
           
 
Constructor Summary
StyleContext.FontKey(String family, int style, int size)
          Constructs a font key.
 
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)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

family

private String family

style

private int style

size

private int size
Constructor Detail

StyleContext.FontKey

public StyleContext.FontKey(String family,
                            int style,
                            int size)
Constructs a font key.

Method Detail

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