summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sources/prefs/editors/VSEditor.java2
-rw-r--r--sources/simulator/VSSimulation.java11
2 files changed, 10 insertions, 3 deletions
diff --git a/sources/prefs/editors/VSEditor.java b/sources/prefs/editors/VSEditor.java
index 5b60e75..faea37f 100644
--- a/sources/prefs/editors/VSEditor.java
+++ b/sources/prefs/editors/VSEditor.java
@@ -12,7 +12,7 @@ import simulator.*;
import utils.*;
import prefs.VSPrefs;
-abstract class VSEditor implements ActionListener {
+public abstract class VSEditor implements ActionListener {
protected static final int LABEL_FIELD_COLS = 18;
protected static final int VALUE_FIELD_COLS = 7;
protected int prefsCategory;
diff --git a/sources/simulator/VSSimulation.java b/sources/simulator/VSSimulation.java
index bd19ff0..0216550 100644
--- a/sources/simulator/VSSimulation.java
+++ b/sources/simulator/VSSimulation.java
@@ -335,17 +335,24 @@ public class VSSimulation extends JPanel {
if (processNum != simulationCanvas.getNumProcesses()) {
variablesPanel.removeAll();
VSProcess process = getSelectedProcess();
- //VSEditor editor = new VSProcessEditor(prefs, process, VSEditor.ALL_PREFERENCES);
- //variablesPanel.add(editor);
+ VSProcessEditor editor = new VSProcessEditor(prefs, process);
+ variablesPanel.add(new JScrollPane(editor.getContentPane()));
}
}
});
variablesPanel = new JPanel();
globalVariablesPanel = new JPanel();
+
+ variablesPanel.setLayout(new BoxLayout(variablesPanel, BoxLayout.Y_AXIS));
+ globalVariablesPanel.setLayout(new BoxLayout(globalVariablesPanel, BoxLayout.Y_AXIS));
+
tabbedPane.add(prefs.getString("lang.variables"), variablesPanel);
tabbedPane.add(prefs.getString("lang.variables.global"), globalVariablesPanel);
+ VSSimulationEditor editor = new VSSimulationEditor(prefs, simulatorFrame);
+ globalVariablesPanel.add(new JScrollPane(editor.getContentPane()));
+
editPanel.add(processesComboBox);
editPanel.add(tabbedPane);