From 8f5e471f79fdd55b7dc397f942232cb036c14017 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 18 Oct 2017 17:16:01 +0100 Subject: [PATCH] JAL-2779 remove dead code --- src/jalview/gui/Desktop.java | 28 ---------------------------- src/jalview/gui/PromptUserConfig.java | 10 ++-------- 2 files changed, 2 insertions(+), 36 deletions(-) diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index cb3ed95..ad80ca5 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -68,8 +68,6 @@ import java.awt.dnd.DropTargetEvent; import java.awt.dnd.DropTargetListener; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.awt.event.FocusEvent; -import java.awt.event.FocusListener; import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -433,24 +431,6 @@ public class Desktop extends jalview.jbgui.GDesktop }); desktop.addMouseListener(ma); - this.addFocusListener(new FocusListener() - { - - @Override - public void focusLost(FocusEvent e) - { - // TODO Auto-generated method stub - - } - - @Override - public void focusGained(FocusEvent e) - { - Cache.log.debug("Relaying windows after focus gain"); - // make sure that we sort windows properly after we gain focus - instance.relayerWindows(); - } - }); this.setDropTarget(new java.awt.dnd.DropTarget(desktop, this)); // Spawn a thread that shows the splashscreen SwingUtilities.invokeLater(new Runnable() @@ -2514,14 +2494,6 @@ public class Desktop extends jalview.jbgui.GDesktop } } - /** - * fixes stacking order after a modal dialog to ensure windows that should be - * on top actually are - */ - public void relayerWindows() - { - - } /** * Accessor method to quickly get all the AlignmentFrames loaded. diff --git a/src/jalview/gui/PromptUserConfig.java b/src/jalview/gui/PromptUserConfig.java index 6261015..cb59452 100644 --- a/src/jalview/gui/PromptUserConfig.java +++ b/src/jalview/gui/PromptUserConfig.java @@ -24,8 +24,6 @@ import jalview.bin.Cache; import java.awt.Component; -import javax.swing.JOptionPane; - public class PromptUserConfig implements Runnable { /** @@ -120,6 +118,7 @@ public class PromptUserConfig implements Runnable this.allowCancel = allowCancel; } + @Override public void run() { if (property == null) @@ -206,12 +205,7 @@ public class PromptUserConfig implements Runnable (allowCancel) ? JvOptionPane.YES_NO_CANCEL_OPTION : JvOptionPane.YES_NO_OPTION, JvOptionPane.QUESTION_MESSAGE); - // now, ask the desktop to relayer any external windows that might have - // been obsured - if (Desktop.instance != null) - { - Desktop.instance.relayerWindows(); - } + // and finish parsing the result jalview.bin.Cache.log.debug("Got response : " + reply); if (reply == JvOptionPane.YES_OPTION) -- 1.7.10.2