|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.neu.ccs.gui.LookAndFeelTools
Class LookAndFeelTools contains several static methods
that assist in using the Java look and feel facilities.
Class LookAndFeelTools cannot be instantiated.
| Field Summary | |
static float |
MINIMUM_NET_FONT_SIZE_ADJUSTMENT
The lower bound for the net font size adjustment. |
| Fields inherited from interface edu.neu.ccs.util.JPTConstants |
ABOVE, ALIGNMENT, BELOW, BOTTOM_LEFT, BOTTOM_RIGHT, DEFAULT, FONT, INPUT_PROPERTIES, MANDATORY, OPTIONAL, ORIENTATION, TOP_LEFT, TOP_RIGHT |
| Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Method Summary | |
static void |
adjustAllDefaultFontSizes(float delta)
Adjusts the font size of all default fonts by adding the given delta to the initial font size. |
static String[] |
getInstalledLookAndFeelClassNames()
Returns the array of class names of the installed look and feel entities. |
static String[] |
getInstalledLookAndFeelNames()
Returns the array of short names of the installed look and feel entities. |
static float |
getNetFontSizeAdjustment()
Returns the net font size adjustment to the look and feel fonts after one or more calls to the tools in this package. |
static void |
showSelectLookAndFeelDialog()
Displays a dialog that permits the user to select the look and feel from among the look and feel options that are currently installed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final float MINIMUM_NET_FONT_SIZE_ADJUSTMENT
| Method Detail |
public static void showSelectLookAndFeelDialog()
Displays a dialog that permits the user to select the look and feel from among the look and feel options that are currently installed.
In addition, permits the user to adjust the font size of each default font by a fixed amount specified by a sequence of constants provided in the dialog.
This method must be called before any GUI objects are displayed on
screen. Therefore, it is best to make the following code the first
line of the main method that launches the program:
LookAndFeelTools.showSelectLookAndFeelDialog();
getInstalledLookAndFeelNames(),
getInstalledLookAndFeelClassNames(),
adjustAllDefaultFontSizes(float)public static String[] getInstalledLookAndFeelNames()
showSelectLookAndFeelDialog(),
getInstalledLookAndFeelClassNames()public static String[] getInstalledLookAndFeelClassNames()
showSelectLookAndFeelDialog(),
getInstalledLookAndFeelNames()public static void adjustAllDefaultFontSizes(float delta)
Adjusts the font size of all default fonts by adding the given delta to the initial font size.
The method recognizes a default font by looking for the String "font"
in each key of a UIDefaults object.
This method prevents the net font size adjustment obtained from one or more calls to the tools in this package from becoming less than the lower bound MINIMUM_NET_FONT_SIZE_ADJUSTMENT.
showSelectLookAndFeelDialog()public static float getNetFontSizeAdjustment()
Returns the net font size adjustment to the look and feel fonts after one or more calls to the tools in this package.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||