mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-142156 Project leak on SheetController$2
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user