Class LookUtils


  • public final class LookUtils
    extends java.lang.Object
    Provides convenience behavior used by the JGoodies Looks.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private LookUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getSystemProperty​(java.lang.String key)
      Tries to look up the System property for the given key.
      private static boolean startsWith​(java.lang.String str, java.lang.String prefix)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • OS_NAME

        private static final java.lang.String OS_NAME
        The os.name System Property. Operating system name.

        Defaults to null if the runtime does not have security access to read this property or the property does not exist.

      • OS_VERSION

        private static final java.lang.String OS_VERSION
        The os.version System Property. Operating system version.

        Defaults to null if the runtime does not have security access to read this property or the property does not exist.

      • IS_OS_MAC

        public static final boolean IS_OS_MAC
        True if this is the Mac OS X.
      • IS_OS_WINDOWS

        public static final boolean IS_OS_WINDOWS
        True if this is Windows.
      • IS_OS_WINDOWS_95

        public static final boolean IS_OS_WINDOWS_95
        True if this is Windows 95.
        Since:
        2.0
      • IS_OS_WINDOWS_98

        public static final boolean IS_OS_WINDOWS_98
        True if this is Windows 98.
        Since:
        2.0
      • IS_OS_WINDOWS_NT

        public static final boolean IS_OS_WINDOWS_NT
        True if this is Windows NT.
        Since:
        2.0
      • IS_OS_WINDOWS_ME

        public static final boolean IS_OS_WINDOWS_ME
        True if this is Windows ME.
        Since:
        2.0
      • IS_OS_MAC_YOSEMITE

        public static final boolean IS_OS_MAC_YOSEMITE
        True if this is Mac Yosemite.
      • IS_OS_MAC_EL_CAPITAN_OR_LATER

        public static final boolean IS_OS_MAC_EL_CAPITAN_OR_LATER
        True if this is Mac El Capitan or later
      • IS_OS_MAC_MOJAVE_OR_LATER

        public static final boolean IS_OS_MAC_MOJAVE_OR_LATER
        True if this is Mac Mojave or later
      • IS_OS_MAC_CATALINA_OR_LATER

        public static final boolean IS_OS_MAC_CATALINA_OR_LATER
        True if this is Mac Catalina or later
    • Constructor Detail

      • LookUtils

        private LookUtils()
    • Method Detail

      • getSystemProperty

        public static java.lang.String getSystemProperty​(java.lang.String key)
        Tries to look up the System property for the given key. In untrusted environments this may throw a SecurityException. In this case we catch the exception and answer 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
      • startsWith

        private static boolean startsWith​(java.lang.String str,
                                          java.lang.String prefix)