Merge branch 'develop' into spike/JAL-4047/JAL-4048_columns_in_sequenceID
[jalview.git] / src / jalview / bin / HiDPISetting.java
index 2bce673..e14c032 100644 (file)
@@ -20,9 +20,8 @@
  */
 package jalview.bin;
 
-import java.util.Locale;
-
 import java.awt.HeadlessException;
+import java.util.Locale;
 
 public class HiDPISetting
 {
@@ -117,8 +116,9 @@ public class HiDPISetting
         }
       } catch (NumberFormatException e)
       {
-        System.err.println(setHiDPIScalePropertyName + " property give ("
-                + setHiDPIScaleProperty + ") but not parseable as integer");
+        jalview.bin.Console.errPrintln(setHiDPIScalePropertyName
+                + " property give (" + setHiDPIScaleProperty
+                + ") but not parseable as integer");
       }
     }
     if (setHiDPI && setHiDPIScale > 0)
@@ -135,8 +135,8 @@ public class HiDPISetting
       try
       {
         int existingPropertyVal = Integer.parseInt(existingProperty);
-        System.out.println("Existing " + scalePropertyName + " is "
-                + existingPropertyVal);
+        jalview.bin.Console.outPrintln("Existing " + scalePropertyName
+                + " is " + existingPropertyVal);
         if (existingPropertyVal > 1)
         {
           setHiDPIScale(existingPropertyVal);
@@ -144,8 +144,9 @@ public class HiDPISetting
         }
       } catch (NumberFormatException e)
       {
-        System.out.println("Could not convert property " + scalePropertyName
-                + " vale '" + existingProperty + "' to number");
+        jalview.bin.Console.outPrintln(
+                "Could not convert property " + scalePropertyName
+                        + " vale '" + existingProperty + "' to number");
       }
     }
 
@@ -159,7 +160,11 @@ public class HiDPISetting
       dpi = screenInfo.getScreenResolution();
     } catch (HeadlessException e)
     {
-      System.err.println("Cannot get screen resolution: " + e.getMessage());
+      if (isLinux)
+      {
+        jalview.bin.Console.errPrintln(
+                "Cannot get screen resolution: " + e.getMessage());
+      }
     }
 
     // try and get screen size height and width
@@ -171,8 +176,12 @@ public class HiDPISetting
       mindimension = Math.min(height, width);
     } catch (HeadlessException e)
     {
-      System.err.println(
-              "Cannot get screen size height and width:" + e.getMessage());
+      if (isLinux)
+      {
+        jalview.bin.Console
+                .errPrintln("Cannot get screen size height and width:"
+                        + e.getMessage());
+      }
     }
 
     // attempt at a formula for scaling based on screen dpi and mindimension.