// get and use command line property values first
String setHiDPIProperty = System.getProperty(setHiDPIPropertyName);
- setHiDPI = setHiDPIProperty != null
- && setHiDPIProperty.equalsIgnoreCase("true");
+ boolean setHiDPIPropertyBool = Boolean.parseBoolean(setHiDPIProperty);
+
+ // allow -DsetHiDPI=false to turn off HiDPI scaling
+ if (setHiDPIProperty != null && !setHiDPIPropertyBool)
+ {
+ clear();
+ doneInit = true;
+ return;
+ }
+
+ setHiDPI = setHiDPIProperty != null && setHiDPIPropertyBool;
String setHiDPIScaleProperty = System
.getProperty(setHiDPIScalePropertyName);
try
{
setHiDPIScale = Integer.parseInt(setHiDPIScaleProperty);
+ // if setHiDPIScale property is validly set and setHiDPI property wasn't
+ // attempted to be set we assume setHiDPIScale to be true
+ if (setHiDPIProperty == null)
+ {
+ setHiDPI = true;
+ }
} catch (NumberFormatException e)
{
System.err.println(setHiDPIScalePropertyName + " property give ("