From 06aa668ef68563234ff6a3f76003c9edf1afe6ff Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 25 Feb 2019 17:38:01 -0800 Subject: [PATCH] Formatting tweaks. --- .../com/threerings/getdown/launcher/GetdownApp.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java b/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java index ba4a78c..fde79f3 100644 --- a/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java +++ b/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java @@ -5,8 +5,6 @@ package com.threerings.getdown.launcher; -import static com.threerings.getdown.Log.log; - import java.awt.Color; import java.awt.Container; import java.awt.EventQueue; @@ -34,6 +32,7 @@ import com.threerings.getdown.data.EnvConfig; import com.threerings.getdown.data.SysProps; import com.threerings.getdown.util.LaunchUtil; import com.threerings.getdown.util.StringUtil; +import static com.threerings.getdown.Log.log; /** * The main application entry point for Getdown. @@ -115,10 +114,11 @@ public class GetdownApp } }); // handle close on ESC - _frame.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW) - .put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "Cancel"); //$NON-NLS-1$ - _frame.getRootPane().getActionMap().put("Cancel", new AbstractAction() { //$NON-NLS-1$ - public void actionPerformed(ActionEvent e) { + String cancelId = "Cancel"; // $NON-NLS-1$ + _frame.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put( + KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), cancelId); + _frame.getRootPane().getActionMap().put(cancelId, new AbstractAction() { + public void actionPerformed (ActionEvent e) { handleWindowClose(); } });