|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mucommander.ui.text.FontUtils
public class FontUtils
This class contains a set of helper methods that allow to easily change the font of a JComponent
| Constructor Summary | |
|---|---|
FontUtils()
|
|
| Method Summary | |
|---|---|
static void |
changeSize(javax.swing.JComponent comp,
float newSize)
Changes the size of the given component's font. |
static void |
changeStyle(javax.swing.JComponent comp,
int newStyle)
Changes the style of the given component's font. |
static void |
changeStyleAndSize(javax.swing.JComponent comp,
int newStyle,
float newSize)
Changes the style and size of the given component's font. |
static void |
makeBold(javax.swing.JComponent comp)
Changes the style of the given component's font to Font.BOLD. |
static void |
makeBoldItalic(javax.swing.JComponent comp)
Changes the style of the given component's font to Font.BOLD|Font.ITALIC. |
static void |
makeItalic(javax.swing.JComponent comp)
Changes the style of the given component's font to Font.ITALIC. |
static void |
makeMini(javax.swing.JComponent comp)
Decreases the size of the given component's font by 2 units. |
static void |
makePlain(javax.swing.JComponent comp)
Changes the style of the given component's font to Font.PLAIN. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FontUtils()
| Method Detail |
|---|
public static void changeStyle(javax.swing.JComponent comp,
int newStyle)
comp - the component for which to change the fontnewStyle - the new Font style to use, see java.awt.Font for allowed values
public static void changeSize(javax.swing.JComponent comp,
float newSize)
comp - the component for which to change the fontnewSize - the new Font size to use, see java.awt.Font for allowed values
public static void changeStyleAndSize(javax.swing.JComponent comp,
int newStyle,
float newSize)
comp - the component for which to change the fontnewStyle - the new Font style to use, see java.awt.Font for allowed valuesnewSize - the new Font size to use, see java.awt.Font for allowed valuespublic static void makeBold(javax.swing.JComponent comp)
Font.BOLD.
Other attributes of the font are left unchanged.
comp - the component for which to change the fontpublic static void makeItalic(javax.swing.JComponent comp)
Font.ITALIC.
Other attributes of the font are left unchanged.
comp - the component for which to change the fontpublic static void makeBoldItalic(javax.swing.JComponent comp)
Font.BOLD|Font.ITALIC.
Other attributes of the font are left unchanged.
comp - the component for which to change the fontpublic static void makePlain(javax.swing.JComponent comp)
Font.PLAIN.
Other attributes of the font are left unchanged.
comp - the component for which to change the fontpublic static void makeMini(javax.swing.JComponent comp)
comp - the component for which to change the font
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard