public class FontInfo
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BOLD |
static int |
ITALIC |
static int |
PLAIN |
static int |
STRIKEOUT |
static int |
UNDERLINE |
| Constructor and Description |
|---|
FontInfo(java.lang.String name,
int style,
int size)
Constructs a
FontInfo object. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other)
Returns
true if the other object is a FontInfo object with
the same value. |
java.lang.String |
getName()
Returns the font name.
|
int |
getSize()
Returns the font size.
|
int |
getStyle()
Returns the font style.
|
int |
hashCode()
Overloads the
java.lang.Object core specification to return a data-specific
hash value rather than the default instance-specific hash code. |
void |
setName(java.lang.String name)
Sets the font name.
|
void |
setSize(int size)
Sets the font size.
|
void |
setStyle(int style)
Sets the font style.
|
java.lang.String |
toString()
Returns a
String describing the font. |
public static final int PLAIN
public static final int BOLD
public static final int ITALIC
public static final int UNDERLINE
public static final int STRIKEOUT
public FontInfo(java.lang.String name,
int style,
int size)
FontInfo object.name - the font namestyle - the font stylesize - the font sizeFontpublic java.lang.String getName()
public int getStyle()
public int getSize()
public void setName(java.lang.String name)
public void setStyle(int style)
public void setSize(int size)
public java.lang.String toString()
String describing the font.toString in class java.lang.Objectpublic boolean equals(java.lang.Object other)
true if the other object is a FontInfo object with
the same value. Otherwise, it returns false.equals in class java.lang.Objectpublic int hashCode()
java.lang.Object core specification to return a data-specific
hash value rather than the default instance-specific hash code.hashCode in class java.lang.Object