Package moa.gui
Class LookAndFeel
- java.lang.Object
-
- moa.gui.LookAndFeel
-
public class LookAndFeel extends Object
Manages setting the look and feel. Uses theKEY_LOOKANDFEEL
property fromGUIDefaults
to determine what Look'n'Feel to use. See examples in the GUI.props file for more details.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description static String
CROSSPLATFORM_LNF
the cross-platform LnF classname.static String
KEY_LOOKANDFEEL
the LnF property in the GUI defaults.protected static Logger
LOGGER
for logging output.static String
VALUE_CROSSPLATFORM
for using the cross-platform LnF (= metal).static String
VALUE_SYSTEM
for using the system's default LnF.static String
WINDOWS_LNF
the Windows LnF classname.
-
Constructor Summary
Constructors Constructor Description LookAndFeel()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static boolean
attemptInstallJavaLookAndFeel(String lnf)
Attempts to install the specified Look'n'Feel, but falls back on cross-platform look if it fails.static void
install()
Installs the look and feel.protected static boolean
installJavaLookAndFeel(String lnf)
Attempts to install the specified Java Look'n'Feel.
-
-
-
Field Detail
-
KEY_LOOKANDFEEL
public static final String KEY_LOOKANDFEEL
the LnF property in the GUI defaults.- See Also:
- Constant Field Values
-
WINDOWS_LNF
public static final String WINDOWS_LNF
the Windows LnF classname.- See Also:
- Constant Field Values
-
CROSSPLATFORM_LNF
public static final String CROSSPLATFORM_LNF
the cross-platform LnF classname.- See Also:
- Constant Field Values
-
VALUE_SYSTEM
public static final String VALUE_SYSTEM
for using the system's default LnF.- See Also:
- Constant Field Values
-
VALUE_CROSSPLATFORM
public static final String VALUE_CROSSPLATFORM
for using the cross-platform LnF (= metal).- See Also:
- Constant Field Values
-
LOGGER
protected static Logger LOGGER
for logging output.
-
-
Method Detail
-
installJavaLookAndFeel
protected static boolean installJavaLookAndFeel(String lnf)
Attempts to install the specified Java Look'n'Feel.- Parameters:
lnf
- the look'n'feel classname- Returns:
- true if successfully installed
-
attemptInstallJavaLookAndFeel
protected static boolean attemptInstallJavaLookAndFeel(String lnf)
Attempts to install the specified Look'n'Feel, but falls back on cross-platform look if it fails.- Parameters:
lnf
- the look'n'feel classname- Returns:
- true if successful
-
install
public static void install()
Installs the look and feel.
-
-