|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.tools.FontSizer
public class FontSizer
A class for setting relative font sizes by level.
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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 level
public 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |