|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.ui.UIUtilities
public class UIUtilities
This class provides a variety of static methods for performing useful UI related operations.
Constructor Summary | |
---|---|
UIUtilities()
|
Method Summary | |
---|---|
static void |
applyBackground(Widget w,
java.awt.Color color)
Set up a Widget and all of its children to have a specific background color. |
static void |
applyDefaultBackground(Widget w)
Set up a Widget and all of its children to have the default background and text colors for the program. |
static void |
applyDefaultFont(Widget w)
Set up a Widget and all of its children to have the default font for the program. |
static void |
applyTextColor(Widget w,
java.awt.Color color)
Set up a Widget and all of its children to have a specific text color. |
static java.lang.String[] |
breakString(java.lang.String s)
Break a string into lines which are short enough to easily display in a window. |
static void |
centerDialog(BDialog dlg,
WindowWidget parent)
Given a BDialog, center it relative to a parent window. |
static void |
centerWindow(WindowWidget win)
Given a WindowWidget, center it in the screen. |
static WidgetContainer |
createScrollingList(BList list)
Given an BList, create an appropriate container for it. |
static java.util.List<Widget> |
findAllChildren(Widget w)
Find every Widget which is contained within a specified one, either as a direct child or through multiple levels of nesting. |
static BFrame |
findFrame(Widget w)
Given a Widget, find its parent BFrame. |
static WindowWidget |
findWindow(Widget w)
Given a Widget, find the window that contains it. |
static void |
fitWindowToScreen(WindowWidget win)
Ensure that a WindowWidget fits entirely on the screen, making it smaller if necessary. |
static java.awt.Font |
getDefaultFont()
Get the default font for the program (may be null). |
static int |
getStandardDialogInsets()
Get the insets which should be used on all dialogs. |
static void |
setDefaultFont(java.awt.Font font)
Set the default font for the program (may be null). |
static void |
setEnabled(Widget w,
boolean enabled)
Recursively enable or disable a container and everything inside it. |
static void |
setStandardDialogInsets(int pixels)
Set the insets which should be used on all dialogs. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UIUtilities()
Method Detail |
---|
public static void centerWindow(WindowWidget win)
public static void centerDialog(BDialog dlg, WindowWidget parent)
public static void fitWindowToScreen(WindowWidget win)
public static java.awt.Font getDefaultFont()
public static void setDefaultFont(java.awt.Font font)
public static int getStandardDialogInsets()
public static void setStandardDialogInsets(int pixels)
public static void applyDefaultFont(Widget w)
public static void applyDefaultBackground(Widget w)
public static void applyBackground(Widget w, java.awt.Color color)
public static void applyTextColor(Widget w, java.awt.Color color)
public static WidgetContainer createScrollingList(BList list)
public static WindowWidget findWindow(Widget w)
public static BFrame findFrame(Widget w)
public static java.lang.String[] breakString(java.lang.String s)
public static void setEnabled(Widget w, boolean enabled)
public static java.util.List<Widget> findAllChildren(Widget w)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |