8270859: Post JEP 411 refactoring: client libs with maximum covering > 10K

Reviewed-by: serb
This commit is contained in:
Weijun Wang
2021-07-27 17:34:19 +00:00
parent c8af8238b4
commit 90cd2fa164
22 changed files with 185 additions and 136 deletions

View File

@@ -59,21 +59,19 @@ import sun.security.action.GetPropertyAction;
* @see GraphicsDevice
* @see GraphicsConfiguration
*/
@SuppressWarnings("removal")
public abstract class SunGraphicsEnvironment extends GraphicsEnvironment
implements DisplayChangedListener {
/** Establish the default font to be used by SG2D. */
private final Font defaultFont = new Font(Font.DIALOG, Font.PLAIN, 12);
private static final boolean uiScaleEnabled;
private static final double debugScale;
@SuppressWarnings("removal")
private static final boolean uiScaleEnabled
= "true".equals(AccessController.doPrivileged(
new GetPropertyAction("sun.java2d.uiScale.enabled", "true")));
static {
uiScaleEnabled = "true".equals(AccessController.doPrivileged(
new GetPropertyAction("sun.java2d.uiScale.enabled", "true")));
debugScale = uiScaleEnabled ? getScaleFactor("sun.java2d.uiScale") : -1;
}
private static final double debugScale =
uiScaleEnabled ? getScaleFactor("sun.java2d.uiScale") : -1;
protected GraphicsDevice[] screens;
@@ -299,6 +297,7 @@ public abstract class SunGraphicsEnvironment extends GraphicsEnvironment
public static double getScaleFactor(String propertyName) {
@SuppressWarnings("removal")
String scaleFactor = AccessController.doPrivileged(
new GetPropertyAction(propertyName, "-1"));