public class FontSizer
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addPropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener.
|
static double |
getFactor(int level)
Gets the factor corresponding to a specified level.
|
static int |
getLevel()
Gets the current font level.
|
static java.awt.Font |
getResizedFont(java.awt.Font font,
double factor)
Resizes a font by a specified factor.
|
static java.awt.Font |
getResizedFont(java.awt.Font font,
int level)
Resizes a font to a specified level.
|
static void |
levelDown()
Decrements the font level and informs all listeners.
|
static void |
levelUp()
Increments the font level and informs all listeners.
|
static void |
removePropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener.
|
static void |
setFonts(java.lang.Object obj,
int level)
Sets the fonts of an object to a specified level.
|
static void |
setLevel(int n)
Sets the font level and informs all listeners.
|
public static void setLevel(int n)
n - a non-negative integer levelpublic static int getLevel()
public static void levelUp()
public static void levelDown()
public static void setFonts(java.lang.Object obj,
int level)
obj - the objectlevel - the levelpublic static java.awt.Font getResizedFont(java.awt.Font font,
int level)
font - the fontlevel - the levelpublic static java.awt.Font getResizedFont(java.awt.Font font,
double factor)
font - the fontfactor - the factorpublic static double getFactor(int level)
level - the levelpublic static void addPropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
property - the name of the property (only "level" accepted)listener - the object requesting property change notificationpublic static void removePropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
property - the name of the property (only "level" accepted)listener - the listener requesting removal