Commit e3fd062c authored by Denis Fokin's avatar Denis Fokin
Browse files

IDEA-142156 Project leak on SheetController$2

parent c50744c7
Showing with 7 additions and 2 deletions
+7 -2
......@@ -44,6 +44,9 @@ import java.net.URL;
* Created by Denis Fokin
*/
public class SheetController {
private static final KeyStroke VK_ESC_KEYSTROKE = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
private static final Logger LOG = Logger.getInstance(SheetController.class);
private static final int SHEET_MINIMUM_HEIGHT = 143;
private static final String fontName = "Lucida Grande";
......@@ -208,7 +211,7 @@ public class SheetController {
};
mySheetPanel.registerKeyboardAction(actionListener,
KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),
VK_ESC_KEYSTROKE,
JComponent.WHEN_IN_FOCUSED_WINDOW);
for (JButton button: buttons) {
......@@ -476,6 +479,8 @@ public class SheetController {
g.dispose();
myOffScreenFrame.remove(mySheetPanel);
myOffScreenFrame.dispose();
return image;
}
......@@ -489,7 +494,7 @@ public class SheetController {
}
public void dispose() {
mySheetPanel.unregisterKeyboardAction(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0));
mySheetPanel.unregisterKeyboardAction(VK_ESC_KEYSTROKE);
mySheetMessage = null;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment