|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.struc.graphics.MFont
public class MFont
Font wrapper class that does not require an X server.
| Field Summary | |
|---|---|
static int |
BOLD
Bold font style. |
static int |
ITALIC
Italic font style. |
static int |
PLAIN
Plain font style. |
| Constructor Summary | |
|---|---|
MFont(java.awt.Font f)
Create a wrapper for the specified AWT font. |
|
MFont(MFont f)
Copy constructor. |
|
MFont(java.lang.String str)
Parses a font from a string. |
|
MFont(java.lang.String family,
int style,
double size)
Contructs a font. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Creates a clone. |
MFont |
cloneMFont()
Creates a clone. |
boolean |
equals(java.lang.Object o)
Tests whether two font objects equal. |
java.awt.Font |
getAWTFont()
Gets an AWT font instance. |
java.lang.String |
getFamily()
Gets the font family name. |
double |
getSizeDouble()
Gets the font size. |
java.lang.String |
getString()
Gets the string representation. |
int |
getStyle()
Gets the font style. |
boolean |
isBold()
Tests whether the font is bold. |
boolean |
isItalic()
Tests whether the font is italic. |
static java.lang.String |
sizeToString(double size)
Converts an integer or fractional size to a string. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PLAIN
public static final int BOLD
public static final int ITALIC
| Constructor Detail |
|---|
public MFont(java.lang.String family,
int style,
double size)
family - the familystyle - the stylesize - the size
public MFont(java.lang.String str)
throws java.lang.IllegalArgumentException
str - the string to be converted
java.lang.IllegalArgumentExceptionpublic MFont(MFont f)
f - the font to copypublic MFont(java.awt.Font f)
f - the AWT font| Method Detail |
|---|
public java.lang.String getFamily()
public int getStyle()
public double getSizeDouble()
public boolean isBold()
public boolean isItalic()
public java.awt.Font getAWTFont()
public java.lang.String getString()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic MFont cloneMFont()
public java.lang.Object clone()
clone in class java.lang.Objectpublic static java.lang.String sizeToString(double size)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||