Package com.actelion.research.gui.hidpi
Class HiDPIUtil
- java.lang.Object
-
- com.actelion.research.gui.hidpi.HiDPIUtil
-
public class HiDPIUtil extends java.lang.Object
- Author:
- max
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
IS_JAVA_10
static boolean
IS_JAVA_11
static boolean
IS_JAVA_8
static boolean
IS_JAVA_8_OR_OLDER
static boolean
IS_JAVA_9
static boolean
IS_VENDOR_APPLE
-
Constructor Summary
Constructors Constructor Description HiDPIUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
getScaleFactor()
static double
getScaleFactor(java.awt.Graphics2D graphics)
static java.lang.String
getSystemProperty(java.lang.String key)
Tries to look up the System property for the given key.
-
-
-
Field Detail
-
IS_JAVA_8_OR_OLDER
public static final boolean IS_JAVA_8_OR_OLDER
-
IS_JAVA_8
public static final boolean IS_JAVA_8
-
IS_JAVA_9
public static final boolean IS_JAVA_9
-
IS_JAVA_10
public static final boolean IS_JAVA_10
-
IS_JAVA_11
public static final boolean IS_JAVA_11
-
IS_VENDOR_APPLE
public static final boolean IS_VENDOR_APPLE
-
-
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 answernull
.- 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
-
getScaleFactor
public static double getScaleFactor(java.awt.Graphics2D graphics)
-
getScaleFactor
public static double getScaleFactor()
-
-