|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jaxfront.swing.ui.tools.FontTools
public class FontTools
This class provides methodes to get, set or modifie a font.
| Field Summary | |
|---|---|
static java.awt.Font |
BOLDFONT
Default font, but bold |
static java.awt.Font |
PLAINFONT
Default font, but plain |
| Constructor Summary | |
|---|---|
FontTools()
|
|
| Method Summary | |
|---|---|
static java.awt.Font |
evaluateDefaultFont()
Evaluates the default font. |
static java.awt.Font |
getBoldFont(float size)
Returns the default font in bold with the specified size. |
static java.awt.Font |
getDefaultFont()
Returns the default font. |
static java.awt.Font |
getFont(java.lang.String fontName)
Returns the font with the specified name. |
static java.awt.Font |
getFont(java.lang.String fontName,
float size)
Returns the font with the specified name and size. |
static java.awt.Font |
getFont(java.lang.String fontname,
int style,
float size)
Returns the font with the specified name, style and size. |
static java.awt.Font |
getPlainFont(float size)
Returns the plain font with the specified size. |
static void |
main(java.lang.String[] args)
Main method to start a demo of this class. |
static void |
registerFont(java.lang.String name,
java.awt.Font font)
Registers the font with the specified name. |
static void |
setDefaultFont(java.awt.Font font)
Sets the default font with the specified font. |
static void |
setFont(java.awt.Container c)
Sets the default font for a container . |
static void |
setFont(java.awt.Container c,
java.awt.Font f)
Sets the specified font for the specified container. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.awt.Font PLAINFONT
public static final java.awt.Font BOLDFONT
| Constructor Detail |
|---|
public FontTools()
| Method Detail |
|---|
public static java.awt.Font evaluateDefaultFont()
public static java.awt.Font getBoldFont(float size)
public static java.awt.Font getDefaultFont()
public static java.awt.Font getFont(java.lang.String fontName)
fontName - the name of the font
public static java.awt.Font getFont(java.lang.String fontName,
float size)
fontName - the name of the fontsize - the size of the font
public static java.awt.Font getFont(java.lang.String fontname,
int style,
float size)
fontName - the name of the fontstyle - style of the font eq. Font.ITALICsize - the size of the font
public static java.awt.Font getPlainFont(float size)
size - size of the new font
public static void main(java.lang.String[] args)
args[] - none arguments are required to start this demo
public static void registerFont(java.lang.String name,
java.awt.Font font)
name - name of the fontfont - the font to be registeredpublic static void setDefaultFont(java.awt.Font font)
font - the new default fontpublic static void setFont(java.awt.Container c)
c - container that should have the new font
public static void setFont(java.awt.Container c,
java.awt.Font f)
c - container that should have the specified fontf - the font that should be setted to the container
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||