public final class LookUtils
extends com.jgoodies.common.base.SystemUtils
Modifier and Type | Field and Description |
---|---|
static boolean |
IS_OS_WINDOWS_95
True if this is Windows 95.
|
static boolean |
IS_OS_WINDOWS_MODERN
True if this is Windows 98/ME/2000/Server 2003/XP/VISTA/Server 2008.
|
static boolean |
IS_OS_WINDOWS_NT
True if this is Windows NT.
|
HAS_MODERN_RASTERIZER, IS_JAVA_6, IS_JAVA_7, IS_JAVA_7_OR_LATER, IS_JAVA_8, IS_JAVA_8_OR_LATER, IS_LAF_WINDOWS_XP_ENABLED, IS_LOW_RESOLUTION, IS_OS_LINUX, IS_OS_MAC, IS_OS_SOLARIS, IS_OS_WINDOWS, IS_OS_WINDOWS_2000, IS_OS_WINDOWS_6_OR_LATER, IS_OS_WINDOWS_7, IS_OS_WINDOWS_8, IS_OS_WINDOWS_98, IS_OS_WINDOWS_ME, IS_OS_WINDOWS_VISTA, IS_OS_WINDOWS_XP, IS_OS_WINDOWS_XP_64_BIT_OR_SERVER_2003, JAVA_VERSION, OS_NAME, OS_VERSION
Modifier and Type | Method and Description |
---|---|
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) |
public static final boolean IS_OS_WINDOWS_MODERN
public static final boolean IS_OS_WINDOWS_95
public static final boolean IS_OS_WINDOWS_NT
public static String getSystemProperty(String key)
null
.key
- the name of the system propertynull
if there's
no such value, or a SecurityException has been caughtpublic static String getSystemProperty(String key, String defaultValue)
key
- the name of the system propertydefaultValue
- the default value if no property exists.public static Boolean getBooleanSystemProperty(String key, String logMessage)
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.key
- the key used to lookup the system property valuelogMessage
- a prefix used when a message is loggedBoolean.TRUE
if the system property has been set to
"true" (case ignored), Boolean.FALSE
if it has been set to
"false", null
otherwisepublic static boolean isTrueColor(Component c)
c
- the component used to determine the toolkitpublic static boolean getToolkitUsesNativeDropShadows()
Options.isPopupDropShadowActive()
public static Color getSlightlyBrighter(Color color)
color
- the color used as basis for the brightened colorpublic static Color getSlightlyBrighter(Color color, float factor)
color
- the color used as basis for the brightened colorfactor
- the factor used to compute the brightnesspublic static void setLookAndTheme(LookAndFeel laf, Object theme) throws UnsupportedLookAndFeelException
UnsupportedLookAndFeelException
public static Object getDefaultTheme(LookAndFeel laf)
public static List getInstalledThemes(LookAndFeel laf)
public static void setLoggingEnabled(boolean enabled)
enabled
- true to enable logging, false to disable itpublic static void log()
public static void log(String message)
message
- the message to printCopyright © 2015 JGoodies Software GmbH. All rights reserved.