public void actionPerformed(ActionEvent e) {
synchronized (Main.this) {
if (encoder != null) {
encoder.finish();
encoder = null;
}
}
if (logConsoleDialog != null) {
Config.setWindow("logConsole", new Rectangle(logConsoleDialog.getX(), logConsoleDialog.getY(),
logConsoleDialog.getWidth(), logConsoleDialog.getHeight()), logConsoleDialog.isVisible());
}
if (recordStoreManagerDialog != null) {
Config.setWindow("recordStoreManager", new Rectangle(recordStoreManagerDialog.getX(),
recordStoreManagerDialog.getY(), recordStoreManagerDialog.getWidth(), recordStoreManagerDialog
.getHeight()), recordStoreManagerDialog.isVisible());
}
if (scaledDisplayFrame != null) {
Config.setWindow("scaledDisplay", new Rectangle(scaledDisplayFrame.getX(), scaledDisplayFrame.getY(),
0, 0), false);
}
Config.setWindow("main", new Rectangle(Main.this.getX(), Main.this.getY(), Main.this.getWidth(), Main.this
.getHeight()), true);
System.exit(0);
}
};