From 0a5c25233b642021bec70224aff9d405b70a3f72 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 13 Jun 2005 11:35:41 +0000 Subject: [PATCH] quit saves screen size --- src/jalview/gui/Desktop.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index e239a10..2a1979e 100755 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -89,14 +89,7 @@ public class Desktop { public void windowClosing(WindowEvent evt) { - jalview.bin.Cache.setProperty("SCREEN_X", getBounds().x + - ""); - jalview.bin.Cache.setProperty("SCREEN_Y", getBounds().y + - ""); - jalview.bin.Cache.setProperty("SCREEN_WIDTH", - getWidth() + ""); - jalview.bin.Cache.setProperty("SCREEN_HEIGHT", - getHeight() + ""); + quit(); } }); setVisible(true); @@ -318,7 +311,7 @@ public class Desktop /* * Exit the program */ - public void quit_actionPerformed(ActionEvent e) + public void quit() { if (jalview.bin.Jalview.applet != null) { @@ -326,6 +319,14 @@ public class Desktop } else { + jalview.bin.Cache.setProperty("SCREEN_X", getBounds().x + + ""); + jalview.bin.Cache.setProperty("SCREEN_Y", getBounds().y + + ""); + jalview.bin.Cache.setProperty("SCREEN_WIDTH", + getWidth() + ""); + jalview.bin.Cache.setProperty("SCREEN_HEIGHT", + getHeight() + ""); System.exit(0); } } -- 1.7.10.2