summaryrefslogtreecommitdiff
path: root/sources/prefs/editors/VSSimulationEditor.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-24 21:06:15 +0000
committerPaul Buetow <paul@buetow.org>2008-05-24 21:06:15 +0000
commit222d028fac58233a451e2de875353252a3dc9f63 (patch)
tree292394f179db68464d9554b71a7ec05368867e33 /sources/prefs/editors/VSSimulationEditor.java
parent61e38d3236ead0b32f8fa1a78901e9d0c75c91ea (diff)
PRocesses now get removed properly.
Removed all VSSimulation* classes.
Diffstat (limited to 'sources/prefs/editors/VSSimulationEditor.java')
-rw-r--r--sources/prefs/editors/VSSimulationEditor.java77
1 files changed, 0 insertions, 77 deletions
diff --git a/sources/prefs/editors/VSSimulationEditor.java b/sources/prefs/editors/VSSimulationEditor.java
deleted file mode 100644
index 4637ec9..0000000
--- a/sources/prefs/editors/VSSimulationEditor.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package prefs.editors;
-
-import java.awt.*;
-import java.awt.event.*;
-import javax.swing.*;
-import javax.swing.border.*;
-import javax.swing.filechooser.*;
-import java.util.*;
-import java.io.File;
-
-import simulator.*;
-import utils.*;
-import prefs.*;
-
-public class VSSimulationEditor extends VSBetterEditor {
- private VSSimulatorFrame simulatorFrame;
- private VSSimulation simulation;
- public static boolean TAKEOVER_BUTTON;
- private boolean dontStartNewSimulation;
-
- public VSSimulationEditor(VSPrefs prefs, VSSimulatorFrame simulatorFrame, VSSimulation simulation) {
- super(prefs, prefs, prefs.getString("lang.name")
- + " - " + prefs.getString("lang.prefs"));
- this.dontStartNewSimulation = true;//simulation != null;
- this.simulatorFrame = simulatorFrame;
- this.simulation = simulation;
- }
-
- public VSSimulationEditor(VSPrefs prefs, VSSimulatorFrame simulatorFrame) {
- super(prefs, prefs, prefs.getString("lang.name")
- + " - " + prefs.getString("lang.prefs"));
- this.simulatorFrame = simulatorFrame;
- }
-
- protected void addToButtonPanelFront(JPanel buttonPanel) {
- if (TAKEOVER_BUTTON) {
- TAKEOVER_BUTTON = false;
- JButton takeoverButton = new JButton(
- prefs.getString("lang.takeover"));
- takeoverButton.setMnemonic(prefs.getInteger("keyevent.takeover"));
- takeoverButton.addActionListener(this);
- buttonPanel.add(takeoverButton);
- }
- }
-
- public void actionPerformed(ActionEvent e) {
- String actionCommand = e.getActionCommand();
-
- if (actionCommand.equals(prefs.getString("lang.takeover"))) {
- savePrefs();
-
- if (simulation != null) {
- if (expertModeChanged())
- simulation.fireExpertModeChanged();
- simulation.updateFromPrefs();
- }
-
- } else if (actionCommand.equals(prefs.getString("lang.cancel"))) {
- if (!dontStartNewSimulation)
- simulatorFrame.dispose();
-
- } else if (actionCommand.equals(prefs.getString("lang.ok"))) {
- savePrefs();
- if (expertModeChanged()) {
- if (simulation != null)
- simulation.fireExpertModeChanged();
- }
- if (!dontStartNewSimulation)
- simulatorFrame.addSimulation(new VSSimulation(prefsToEdit, simulatorFrame));
- else if (simulation != null)
- simulation.updateFromPrefs();
-
- } else {
- super.actionPerformed(e);
- }
- }
-}