//TODO replace with API from Java 9 once that is released
@Deprecated
    public static float getScreenPixelRatio() {
        //TODO replace with API from Java 9 once that is released
        if (Platform.isMac()) {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            Object contentScaleFactor = toolkit.getDesktopProperty("apple.awt.contentScaleFactor");
            if (contentScaleFactor instanceof Number) {
                return ((Number) contentScaleFactor).floatValue();
            } else {
                return 1.0f;
            }
        } else {
            return 1.0f;
        }
    }
@Deprecated
public static float getScreenPixelRatio() {
//TODO replace with API from Java 9 once that is released
if (Platform.isMac()) {
Toolkit toolkit = Toolkit.getDefaultToolkit();
@Deprecated
public static float getScreenPixelRatio() {
//TODO replace with API from Java 9 once that is released
if (Platform.isMac()) {
Toolkit toolkit = Toolkit.getDefaultToolkit();
Object contentScaleFactor = toolkit.getDesktopProperty("apple.awt.contentScaleFactor");
if (contentScaleFactor instanceof Number) {
return ((Number) contentScaleFactor).floatValue();
} else {
return 1.0f;
}
} else {
return 1.0f;
@Deprecated
public static float getScreenPixelRatio() {
//TODO replace with API from Java 9 once that is released
if (Platform.isMac()) {
Toolkit toolkit = Toolkit.getDefaultToolkit();
Object contentScaleFactor = toolkit.getDesktopProperty("apple.awt.contentScaleFactor");
if (contentScaleFactor instanceof Number) {
return ((Number) contentScaleFactor).floatValue();
} else {
return 1.0f;
}
} else {
return 1.0f;
}
}