|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Font
com.swfm.mica.core.MiFont
This class wraps the AWT Font class. This was done for both efficiency and to protect Mica against changes to the AWT Font class.
#MiFontManager,
Serialized Form| Field Summary | |
static int |
BOLD
|
static int |
ITALIC
|
static int |
PLAIN
|
static int |
STRIKEOUT
|
static int |
UNDERLINE
|
static int |
VALID_AWT_STYLES_MASK
|
| Constructor Summary | |
MiFont(java.lang.String name)
Constructs a new PLAIN, 12 pont MiFont of the given typeface family name. |
|
MiFont(java.lang.String name,
int style,
int size)
Constructs a new MiFont. |
|
| Method Summary | |
boolean |
equals(java.lang.Object other)
|
int |
getAverageCharWidth()
Get the average width of all characters in this font. |
java.lang.String |
getFullName()
|
int |
getHeight()
Get the height of a line of characters in this font. |
int |
getMaxCharHeight()
Get the maximum height of all characters in this font. |
int |
getMaxCharWidth()
Get the maximum width of all characters in this font. |
int |
getMaximumDescent()
Get the maximum decent of text in this font. |
java.lang.String |
getName()
Return the name (type face) of this font. |
int |
getPointSize()
Return the point size of this font. |
MiSize |
getSize(char ch,
MiSize size)
Get the size of the given character in this font. |
MiSize |
getSize(java.lang.String text)
Get the size of the given text string in this font. |
MiSize |
getSize(java.lang.String text,
MiSize size)
Get the size of the given text string in this font. |
int |
getStyle()
Return the style of this font. |
int |
getWidth(char ch)
Get the width of the given character in this font. |
int |
getWidth(java.lang.String text)
Get the width of the given text string in this font. |
int |
hashCode()
|
boolean |
isBold()
Return whether or not text drawn with this font is bold. |
boolean |
isItalic()
Return whether or not text drawn with this font is italic. |
boolean |
isStrikeOut()
Return whether or not text drawn with this font is striked-out. |
boolean |
isUnderlined()
Return whether or not text drawn with this font is underlined. |
MiFont |
setBold(boolean flag)
Make and return a font exactly like this font but with a different BOLD style. |
MiFont |
setItalic(boolean flag)
Make and return a font exactly like this font but with a different ITALIC style. |
MiFont |
setName(java.lang.String name)
Make and return a font exactly like this font but with a different type face. |
MiFont |
setPointSize(int points)
Make and return a font exactly like this font but with a different point size. |
MiFont |
setStrikeOut(boolean flag)
Make and return a font exactly like this font but with a different STRIKEOUT style. |
MiFont |
setUnderlined(boolean flag)
Make and return a font exactly like this font but with a different UNDERLINE style. |
| Methods inherited from class java.awt.Font |
canDisplay, canDisplayUpTo, canDisplayUpTo, canDisplayUpTo, createFont, createGlyphVector, createGlyphVector, createGlyphVector, createGlyphVector, decode, deriveFont, deriveFont, deriveFont, deriveFont, deriveFont, deriveFont, getAttributes, getAvailableAttributes, getBaselineFor, getFamily, getFamily, getFont, getFont, getFont, getFontName, getFontName, getItalicAngle, getLineMetrics, getLineMetrics, getLineMetrics, getLineMetrics, getMaxCharBounds, getMissingGlyphCode, getNumGlyphs, getPeer, getPSName, getSize, getSize2D, getStringBounds, getStringBounds, getStringBounds, getStringBounds, getTransform, hasUniformLineMetrics, isPlain, isTransformed, layoutGlyphVector, toString |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
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 static final int VALID_AWT_STYLES_MASK
| Constructor Detail |
public MiFont(java.lang.String name)
name - the family name
public MiFont(java.lang.String name,
int style,
int size)
name - the family namestyle - the style of the fontsize - the size of the font in pointsMiFontManager.getFontList()| Method Detail |
public int getMaxCharWidth()
public int getAverageCharWidth()
public int getMaxCharHeight()
public int getWidth(char ch)
ch - the character to get the width of
public int getHeight()
public MiSize getSize(char ch,
MiSize size)
ch - the character to get the height ofsize - the (returned) size of the character
public int getMaximumDescent()
public int getWidth(java.lang.String text)
public MiSize getSize(java.lang.String text,
MiSize size)
size - the (returned) size of the text string
public MiSize getSize(java.lang.String text)
public int getStyle()
public MiFont setName(java.lang.String name)
name - the new font's type face.
public java.lang.String getName()
public java.lang.String getFullName()
public MiFont setPointSize(int points)
points - the returned font's point size.
public int getPointSize()
public MiFont setBold(boolean flag)
flag - whether the returned font will
have the BOLD style
public boolean isBold()
public MiFont setItalic(boolean flag)
flag - whether the returned font will
have the ITALIC style
public boolean isItalic()
public MiFont setUnderlined(boolean flag)
flag - whether the returned font will
have the UNDERLINE style
public boolean isUnderlined()
public MiFont setStrikeOut(boolean flag)
flag - whether the returned font will
have the STRIKEOUT style
public boolean isStrikeOut()
public int hashCode()
public boolean equals(java.lang.Object other)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||