Fix close modal.

closes #17
This commit is contained in:
Fabian Becker 2014-10-19 03:22:24 +02:00
parent b01b65f790
commit f4b064e64a
2 changed files with 10 additions and 6 deletions

View File

@ -203,7 +203,7 @@ public class Main extends JFrame implements OptimizationStateListener {
try {
splashScreen.splash();
} catch (HeadlessException e) {
System.err.println("Error: no xserver present - deactivating GUI.");
LOGGER.severe("Error: no xserver present - deactivating GUI.");
withGUI = false;
}
}
@ -219,6 +219,8 @@ public class Main extends JFrame implements OptimizationStateListener {
init(hostName, paramsFile, goParams, parent); // this takes a bit
long wait = System.currentTimeMillis() - startTime;
LOGGER.info("Loaded EvA2 in " + wait + "ms.");
System.out.print(wait);
if (!autorun) {
if (!noSplash) {
try {
@ -231,9 +233,9 @@ public class Main extends JFrame implements OptimizationStateListener {
}
} else {
if (!withGUI && (currentModuleAdapter instanceof GenericModuleAdapter)) {
// do not save new parameters for an autorun without GUI - they werent changed manually anyways.
// do not save new parameters for an autorun without GUI - they weren't changed manually anyways.
((GenericModuleAdapter) currentModuleAdapter).getStatistics().setSaveParams(false);
System.out.println("Autorun without GUI - not saving statistics parameters...");
LOGGER.info("Autorun without GUI - not saving statistics parameters...");
}
if (withGUI) {
frameMaker.onUserStart();
@ -317,6 +319,8 @@ public class Main extends JFrame implements OptimizationStateListener {
useDefaultModule = EvAInfo.propDefaultModule();
this.parentWindow = parent;
setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
setUIFont(new javax.swing.plaf.FontUIResource(Font.SANS_SERIF, 0, 11));
if (useDefaultModule != null) {
@ -837,8 +841,8 @@ public class Main extends JFrame implements OptimizationStateListener {
} catch (Exception e) {
LOGGER.log(Level.SEVERE, "Error while newModulAdapter.getModulFrame(): " + e.getMessage(), e);
EVAERROR.EXIT("Error while newModulAdapter.getModulFrame(): " + e.getMessage());
LOGGER.log(Level.SEVERE, "Error while newModuleAdapter.getModuleFrame(): " + e.getMessage(), e);
EVAERROR.EXIT("Error while newModuleAdapter.getModuleFrame(): " + e.getMessage());
}
currentModuleAdapter = newModuleAdapter;

View File

@ -5,10 +5,10 @@ import eva2.tools.EVAHELP;
import eva2.util.annotation.Description;
import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableModel;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;