|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cosylab.gui.components.util.FontHelper
public final class FontHelper
Helper class that provides simple access to Font UI resources
MetalLookAndFeel,
Font| Constructor Summary | |
|---|---|
FontHelper()
|
|
| Method Summary | |
|---|---|
static java.awt.Font |
calculateFittingFont(java.awt.Component comp,
java.awt.Font oldFont,
java.lang.String text,
int columns,
int minFontSize,
int maxFontSize)
Calculates new font, which would fit provided text inside component. |
static java.awt.Font |
getDefaultFont()
Returns the default Font |
static java.lang.String |
getDefaultFontName()
Returns the default Font name |
static int |
getDefaultFontSize()
Returns the default Font size |
static java.awt.Font |
getFont(java.lang.String name,
int style,
int size)
Returns a new Font with the specified attributes |
static java.awt.Font |
getFontWithName(java.lang.String name,
java.awt.Font inFont)
Returns the specified Font with its name changed to the specified name. |
static java.awt.Font |
getFontWithSize(int size,
java.awt.Font inFont)
Returns the specified Font with its size changed to the specified size. |
static java.awt.Font |
getFontWithStyle(int style,
java.awt.Font inFont)
Returns the specified Font with its style changed to the specified style. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FontHelper()
| Method Detail |
|---|
public static java.lang.String getDefaultFontName()
MetalLookAndFeel.getControlTextFont()public static int getDefaultFontSize()
MetalLookAndFeel.getControlTextFont()public static java.awt.Font getDefaultFont()
MetalLookAndFeel.getUserTextFont()
public static java.awt.Font getFontWithStyle(int style,
java.awt.Font inFont)
style - styleinFont - inFont
public static java.awt.Font getFontWithName(java.lang.String name,
java.awt.Font inFont)
name - nameinFont - inFont
public static java.awt.Font getFontWithSize(int size,
java.awt.Font inFont)
size - sizeinFont - inFont
public static java.awt.Font getFont(java.lang.String name,
int style,
int size)
name - namestyle - stylesize - size
public static java.awt.Font calculateFittingFont(java.awt.Component comp,
java.awt.Font oldFont,
java.lang.String text,
int columns,
int minFontSize,
int maxFontSize)
comp - the Component in which text should fitoldFont - old fonttext - a text to be fittedcolumns - number of character columns to fit in componentminFontSize - minimal allowed font sizemaxFontSize - maximal allowed font size
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||