diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-31 00:08:48 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-31 00:08:48 +0000 |
| commit | 62059d598210633f2ec52cd8d2460f275fe5390b (patch) | |
| tree | 25ad781a29f1f33914e101119d40d896ea9fc380 /sources/prefs/editors/VSSimulatorEditor.java | |
| parent | ce95a094dc1ca90ed6b96e570c5cf086fdcad599 (diff) | |
window close bug
Diffstat (limited to 'sources/prefs/editors/VSSimulatorEditor.java')
| -rw-r--r-- | sources/prefs/editors/VSSimulatorEditor.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sources/prefs/editors/VSSimulatorEditor.java b/sources/prefs/editors/VSSimulatorEditor.java index ee78b04..c9b4fab 100644 --- a/sources/prefs/editors/VSSimulatorEditor.java +++ b/sources/prefs/editors/VSSimulatorEditor.java @@ -36,6 +36,10 @@ import prefs.*; public class VSSimulatorEditor extends VSAbstractBetterEditor { private static final long serialVersionUID = 1L; + public static final boolean OPENED_NEW_WINDOW = true; + + public static final boolean OPENED_NEW_TAB = false; + /** The simulator frame. */ private VSSimulatorFrame simulatorFrame; @@ -48,6 +52,9 @@ public class VSSimulatorEditor extends VSAbstractBetterEditor { /** The dont start new simulation. */ private boolean dontStartNewSimulation; + /** Open a new simulator window. */ + private boolean openedNewWindow; + /** * Instantiates a new lang.process.removesimulator editor. * @@ -55,7 +62,8 @@ public class VSSimulatorEditor extends VSAbstractBetterEditor { * @param simulatorFrame the simulator frame * @param simulation the simulation */ - public VSSimulatorEditor(VSPrefs prefs, VSSimulatorFrame simulatorFrame, VSSimulator simulation) { + public VSSimulatorEditor(VSPrefs prefs, VSSimulatorFrame simulatorFrame, + VSSimulator simulation) { super(prefs, prefs, prefs.getString("lang.name") + " - " + prefs.getString("lang.prefs")); this.dontStartNewSimulation = true;//simulation != null; @@ -69,10 +77,12 @@ public class VSSimulatorEditor extends VSAbstractBetterEditor { * @param prefs the prefs * @param simulatorFrame the simulator frame */ - public VSSimulatorEditor(VSPrefs prefs, VSSimulatorFrame simulatorFrame) { + public VSSimulatorEditor(VSPrefs prefs, VSSimulatorFrame simulatorFrame, + boolean openedNewWindow) { super(prefs, prefs, prefs.getString("lang.name") + " - " + prefs.getString("lang.prefs")); this.simulatorFrame = simulatorFrame; + this.openedNewWindow = openedNewWindow; } /* (non-Javadoc) @@ -105,7 +115,7 @@ public class VSSimulatorEditor extends VSAbstractBetterEditor { } } else if (actionCommand.equals(prefs.getString("lang.cancel"))) { - if (!dontStartNewSimulation) + if (!dontStartNewSimulation && openedNewWindow) simulatorFrame.dispose(); } else if (actionCommand.equals(prefs.getString("lang.ok"))) { |
