From 4c007a518fc7e2fdaa863f16cb715f8e45e6cfbf Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Wed, 2 Nov 2022 14:34:11 +0000 Subject: [PATCH] JAL-1988 JAL-3772 Moving packages to somewhere more obvious (jbgui -> gui) --- src/jalview/bin/Jalview.java | 4 ++-- src/jalview/{jbgui => gui}/APQHandlers.java | 4 ++-- src/jalview/gui/Desktop.java | 3 +-- src/jalview/{jbgui => gui}/QuitHandler.java | 5 +---- src/jalview/jbgui/GDesktop.java | 4 ++-- 5 files changed, 8 insertions(+), 12 deletions(-) rename src/jalview/{jbgui => gui}/APQHandlers.java (95%) rename src/jalview/{jbgui => gui}/QuitHandler.java (99%) diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 546e931..b5e1958 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -61,6 +61,8 @@ import jalview.ext.so.SequenceOntology; import jalview.gui.AlignFrame; import jalview.gui.Desktop; import jalview.gui.PromptUserConfig; +import jalview.gui.QuitHandler; +import jalview.gui.QuitHandler.QResponse; import jalview.io.AppletFormatAdapter; import jalview.io.BioJsHTMLOutput; import jalview.io.DataSourceType; @@ -73,8 +75,6 @@ import jalview.io.HtmlSvgOutput; import jalview.io.IdentifyFile; import jalview.io.NewickFile; import jalview.io.gff.SequenceOntologyFactory; -import jalview.jbgui.QuitHandler; -import jalview.jbgui.QuitHandler.QResponse; import jalview.schemes.ColourSchemeI; import jalview.schemes.ColourSchemeProperty; import jalview.util.ChannelProperties; diff --git a/src/jalview/jbgui/APQHandlers.java b/src/jalview/gui/APQHandlers.java similarity index 95% rename from src/jalview/jbgui/APQHandlers.java rename to src/jalview/gui/APQHandlers.java index 12ce1ba..00ec217 100644 --- a/src/jalview/jbgui/APQHandlers.java +++ b/src/jalview/gui/APQHandlers.java @@ -18,7 +18,7 @@ * along with Jalview. If not, see . * The Jalview Authors are detailed in the 'AUTHORS' file. */ -package jalview.jbgui; +package jalview.gui; import com.formdev.flatlaf.extras.FlatDesktop; import com.formdev.flatlaf.extras.FlatDesktop.Action; @@ -33,7 +33,7 @@ public class APQHandlers public static boolean setQuit = false; - public static boolean setAPQHandlers(GDesktop desktop) + public static boolean setAPQHandlers(Desktop desktop) { if (Platform.isJS()) { diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 72c9106..94145bd 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -105,6 +105,7 @@ import jalview.api.AlignmentViewPanel; import jalview.bin.Cache; import jalview.bin.Jalview; import jalview.gui.ImageExporter.ImageWriterI; +import jalview.gui.QuitHandler.QResponse; import jalview.io.BackupFiles; import jalview.io.DataSourceType; import jalview.io.FileFormat; @@ -118,8 +119,6 @@ import jalview.io.JalviewFileChooser; import jalview.io.JalviewFileView; import jalview.jbgui.GSplitFrame; import jalview.jbgui.GStructureViewer; -import jalview.jbgui.QuitHandler; -import jalview.jbgui.QuitHandler.QResponse; import jalview.project.Jalview2XML; import jalview.structure.StructureSelectionManager; import jalview.urls.IdOrgSettings; diff --git a/src/jalview/jbgui/QuitHandler.java b/src/jalview/gui/QuitHandler.java similarity index 99% rename from src/jalview/jbgui/QuitHandler.java rename to src/jalview/gui/QuitHandler.java index 7b5be98..75ff0b0 100644 --- a/src/jalview/jbgui/QuitHandler.java +++ b/src/jalview/gui/QuitHandler.java @@ -1,4 +1,4 @@ -package jalview.jbgui; +package jalview.gui; import java.io.File; import java.util.List; @@ -22,9 +22,6 @@ import jalview.bin.Cache; import jalview.bin.Console; import jalview.datamodel.AlignmentI; import jalview.datamodel.SequenceI; -import jalview.gui.AlignFrame; -import jalview.gui.Desktop; -import jalview.gui.JvOptionPane; import jalview.io.BackupFiles; import jalview.project.Jalview2XML; import jalview.util.MessageManager; diff --git a/src/jalview/jbgui/GDesktop.java b/src/jalview/jbgui/GDesktop.java index 3343c88..b0079b4 100755 --- a/src/jalview/jbgui/GDesktop.java +++ b/src/jalview/jbgui/GDesktop.java @@ -32,6 +32,7 @@ import javax.swing.JMenuItem; import jalview.api.AlignmentViewPanel; import jalview.bin.Cache; +import jalview.gui.APQHandlers; import jalview.gui.Desktop; import jalview.io.FileFormatException; import jalview.util.MessageManager; @@ -141,7 +142,6 @@ public class GDesktop extends JFrame */ private void jbInit() throws Exception { - boolean apqHandlersSet = false; /** * APQHandlers sets handlers for About, Preferences and Quit actions * peculiar to macOS's application menu. APQHandlers will check to see if a @@ -149,7 +149,7 @@ public class GDesktop extends JFrame */ try { - apqHandlersSet = APQHandlers.setAPQHandlers(this); + APQHandlers.setAPQHandlers((Desktop) this); } catch (Exception e) { System.out.println("Cannot set APQHandlers"); -- 1.7.10.2