From ed6ea3eca75d7750869faae2b10588fffd007e99 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Wed, 13 Sep 2023 13:32:33 +0100 Subject: [PATCH] JAL-4262 Made deprecation warning properly modal --- src/jalview/bin/Jalview.java | 6 +++--- src/jalview/util/imagemaker/BitmapImageSizing.java | 15 +++++++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index a05c995..d14c919 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -841,8 +841,6 @@ public class Jalview cmds.processArgs(); boolean commandsSuccess = cmds.argsWereParsed(); - cliWarning(); - if (commandsSuccess) { if (headlessArg) @@ -1252,6 +1250,8 @@ public class Jalview } desktop.setInBatchMode(false); } + + cliWarning(); } private static void setLookAndFeel() @@ -2067,7 +2067,7 @@ public class Jalview String cont = MessageManager.getString("label.continue"); Desktop.instance.nonBlockingDialog(32, 2, title, warning, url, cont, - JvOptionPane.WARNING_MESSAGE, false, true, false); + JvOptionPane.WARNING_MESSAGE, false, true, true); } } if (j.getCommands() != null && j.getCommands().getErrors().size() > 0) diff --git a/src/jalview/util/imagemaker/BitmapImageSizing.java b/src/jalview/util/imagemaker/BitmapImageSizing.java index 450b01b..8bd8ec3 100644 --- a/src/jalview/util/imagemaker/BitmapImageSizing.java +++ b/src/jalview/util/imagemaker/BitmapImageSizing.java @@ -17,11 +17,16 @@ public class BitmapImageSizing this.height = height; } + public boolean isNull() + { + return scale == 0.0f && width == 0 && height == 0; + } + public static BitmapImageSizing nullBitmapImageSizing() { return new BitmapImageSizing(0.0f, 0, 0); } - + public static final String BITMAP_SCALE = "BITMAP_SCALE"; public static final String BITMAP_HEIGHT = "BITMAP_HEIGHT"; @@ -34,8 +39,10 @@ public class BitmapImageSizing */ public static BitmapImageSizing defaultBitmapImageSizing() { - - return new BitmapImageSizing(Cache.getDefault(BITMAP_SCALE,0)/10f,Cache.getDefault(BITMAP_WIDTH,0),Cache.getDefault(BITMAP_HEIGHT,0)); - + + return new BitmapImageSizing(Cache.getDefault(BITMAP_SCALE, 0) / 10f, + Cache.getDefault(BITMAP_WIDTH, 0), + Cache.getDefault(BITMAP_HEIGHT, 0)); + } } -- 1.7.10.2