|
Quaqua 8.0 2011-10-02 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.randelshofer.quaqua.util.Fonts
public class Fonts
Fonts.
Method Summary | |
---|---|
static java.lang.String |
dialogFontTag(java.lang.String text)
Puts an HTML font tag for the Dialog Font around the specified text. |
static java.lang.String |
emphasizedDialogFontTag(java.lang.String text)
Puts an HTML font tag for the Emphasized Dialog Font around the specified text. |
static java.awt.Font |
getApplicationFont()
If your application creates text documents, use the application font as the default for user-created content. |
static java.awt.Font |
getDialogFont()
The dialog font is used for text in menus, modeless dialogs, and titles of document windows. |
static java.awt.Font |
getEmphasizedDialogFont()
Use emphasized dialog fonts sparingly. |
static java.awt.Font |
getEmphasizedSmallDialogFont()
You might use emphasized small dialog font to title a group of settings that appear without a group box, or for brief informative text below a text field. |
static java.awt.Font |
getLabelFont()
The label font is used for labels with controls such as sliders and icon bevel buttons. |
static java.awt.Font |
getMiniDialogFont()
If necessary, the mini dialog font can be used for utility window labels and text. |
static java.awt.Font |
getMonospaceFont()
If your application needs monospaced fonts, use the monospace font. |
static int |
getPerceivedAscent(java.awt.Font f,
java.awt.font.FontRenderContext frc,
int system)
Returns the perceived ascent of the specified font, if text is written using the specified script system and font render context. |
static java.awt.Rectangle |
getPerceivedBounds(java.lang.String str,
java.awt.Font f,
java.awt.Component c)
Returns the perceived bounds of the specified string, if it is rendered using the specified font on the provided component. |
static int |
getPerceivedDescent(java.awt.Font f,
java.awt.font.FontRenderContext frc,
int system)
Returns the perceived descent of the specified font, if text is written using the specified script system and font render context. |
static java.awt.Font |
getSmallDialogFont()
The small dialog font is used for informative text in alerts. |
static int |
getVisualAscent(java.awt.Font f,
java.awt.Component c,
char ch)
Gets the visually perceived ascent of the specified character. |
static java.lang.String |
miniDialogFontTag(java.lang.String text)
Puts an HTML font tag for the Small Dialog Font around the specified text. |
static java.lang.String |
smallDialogFontTag(java.lang.String text)
Puts an HTML font tag for the Small Dialog Font around the specified text. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.awt.Font getDialogFont()
public static java.awt.Font getEmphasizedDialogFont()
public static java.awt.Font getSmallDialogFont()
public static java.awt.Font getEmphasizedSmallDialogFont()
public static java.awt.Font getApplicationFont()
public static java.awt.Font getMonospaceFont()
public static java.awt.Font getLabelFont()
public static java.awt.Font getMiniDialogFont()
public static java.lang.String dialogFontTag(java.lang.String text)
public static java.lang.String smallDialogFontTag(java.lang.String text)
public static java.lang.String miniDialogFontTag(java.lang.String text)
public static java.lang.String emphasizedDialogFontTag(java.lang.String text)
public static int getVisualAscent(java.awt.Font f, java.awt.Component c, char ch)
public static java.awt.Rectangle getPerceivedBounds(java.lang.String str, java.awt.Font f, java.awt.Component c)
public static int getPerceivedAscent(java.awt.Font f, java.awt.font.FontRenderContext frc, int system)
The perceived ascent is a distance above the baseline, chosen by the font designer and the same for all glyphs in a script system, that often corresponds approximately to the tops of the uppercase letters in a Latin script system. Uppercase letters are chosen because, among the regularly used glyphs in a font, they are generally the tallest.
The value returned by this method differs from the ascent returned by java.awt.font.LineMetrics.getAscent(), in that the perceived ascent does not include diacritical marks of the font. Therefore the perceived ascent is useful for visually north alignig text with graphical elements.
public static int getPerceivedDescent(java.awt.Font f, java.awt.font.FontRenderContext frc, int system)
The perceived descent is a distance below the baseline that usually corresponds to the bottoms of uppercase letters in a Latin script system, whithout the descenders of lower case characters. In a Latin script system the perceived descent is usually 0. The descent is the same distance from the baseline for all glyphs in the script system.
The value returned by this method differs from the one that would be returned by java.awt.font.LineMetrics.getAscent(), in that the perceived descent does not include the descender of lower case characters and diacritical marks below them. Therefore the perceived descent is useful for visully south aligning text with graphical elements.
|
Copyright 2003-2007 (c) Werner Randelshofer. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |