com.jgoodies.looks
public final class LookUtils extends Object
Version: $Revision: 1.9 $
Field Summary | |
---|---|
static boolean | IS_JAVA_1_4
True if this is Java 1.4. |
static boolean | IS_JAVA_1_4_0
True if this is Java 1.4.0_*. |
static boolean | IS_JAVA_1_4_2_OR_LATER
True if this is Java 1.4.2 or later. |
static boolean | IS_JAVA_1_4_OR_5
True if this is Java 1.4 or Java 5. |
static boolean | IS_JAVA_5
True if this is Java 5.x. |
static boolean | IS_JAVA_5_OR_LATER
True if this is Java 5.x or later. |
static boolean | IS_JAVA_6
True if this is Java 6. |
static boolean | IS_JAVA_6_OR_LATER
True if this is Java 6.x or later. |
static boolean | IS_LAF_WINDOWS_XP_ENABLED
True if the Windows XP Look&Feel is enabled. |
static boolean | IS_LOW_RESOLUTION
True if if the screen resolution is smaller than 120 dpi.
|
static boolean | IS_OS_FREEBSD
True if this is FreeBSD. |
static boolean | IS_OS_LINUX
True if this is Linux. |
static boolean | IS_OS_MAC
True if this is the Mac OS X. |
static boolean | IS_OS_OS2
True if this is OS/2. |
static boolean | IS_OS_SOLARIS
True if this is Solaris. |
static boolean | IS_OS_WINDOWS
True if this is Windows. |
static boolean | IS_OS_WINDOWS_2000
True if this is Windows 2000.
|
static boolean | IS_OS_WINDOWS_95
True if this is Windows 95.
|
static boolean | IS_OS_WINDOWS_98
True if this is Windows 98.
|
static boolean | IS_OS_WINDOWS_ME
True if this is Windows ME.
|
static boolean | IS_OS_WINDOWS_MODERN
True if this is Windows 98/ME/2000/XP/VISTA. |
static boolean | IS_OS_WINDOWS_NT
True if this is Windows NT.
|
static boolean | IS_OS_WINDOWS_VISTA
True if this is Windows Vista.
|
static boolean | IS_OS_WINDOWS_XP
True if this is Windows XP. |
Method Summary | |
---|---|
static Boolean | getBooleanSystemProperty(String key, String logMessage)
Checks if a boolean system property has been set for the given key,
and returns the associated Boolean, or null if no value
has been set. |
static Object | getDefaultTheme(LookAndFeel laf) |
static List | getInstalledThemes(LookAndFeel laf) |
static Color | getSlightlyBrighter(Color color)
Computes and returns a Color that is slightly brighter
than the specified Color.
|
static Color | getSlightlyBrighter(Color color, float factor)
Computes and returns a Color that is slightly brighter
than the specified Color.
|
static String | getSystemProperty(String key)
Tries to look up the System property for the given key.
|
static String | getSystemProperty(String key, String defaultValue)
Tries to look up the System property for the given key.
|
static boolean | getToolkitUsesNativeDropShadows()
Checks and answers whether this toolkit provides native drop shadows
for popups such as the Mac OS X. |
static boolean | isTrueColor(Component c)
Checks and answers whether we have a true color system.
|
static void | log()
Prints a new line to the console if logging is enabled. |
static void | log(String message)
Prints the given message to the console if logging is enabled.
|
static void | setLoggingEnabled(boolean enabled)
Enables or disables the Looks logging.
|
static void | setLookAndTheme(LookAndFeel laf, Object theme) |
See Also: Toolkit#getScreenResolution()
Since: 2.0
Since: 2.0
Since: 2.0
Since: 2.0
Since: 2.0
Since: 2.0
null
if no value
has been set. The test for the property ignores case.
If a Boolean value has been set, a message is logged
with the given prefix.
Parameters: key the key used to lookup the system property value logMessage a prefix used when a message is logged
Returns: Boolean.TRUE
if the system property has been set to
"true" (case ignored), Boolean.FALSE
if it has been set to
"false", null
otherwise
Parameters: color the color used as basis for the brightened color
Returns: a slightly brighter color
Parameters: color the color used as basis for the brightened color factor the factor used to compute the brightness
Returns: a slightly brighter color
null
.
Parameters: key the name of the system property
Returns: the system property's String value, or null
if there's
no such value, or a SecurityException has been caught
Parameters: key the name of the system property defaultValue the default value if no property exists.
Returns: the system property's String value, or the defaultValue if there's no such value, or a SecurityException has been caught
Returns: true if the toolkit provides native drop shadows
See Also: isPopupDropShadowActive
Parameters: c the component used to determine the toolkit
Returns: true if the component's toolkit has a pixel size >= 24
Parameters: message the message to print
Parameters: enabled true to enable logging, false to disable it