summaryrefslogtreecommitdiff
path: root/sources/prefs/editors/VSEditor.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-22 15:14:34 +0000
committerPaul Buetow <paul@buetow.org>2008-05-22 15:14:34 +0000
commitf7b023c5cff7dae854a015889bd217f3b84f6e07 (patch)
tree7e8767e18803da4928afad0f50760ba1efd2524d /sources/prefs/editors/VSEditor.java
parent4de5343c60cc165cdf30121e0ed9eca96ac91a22 (diff)
Expert mode changable.
Diffstat (limited to 'sources/prefs/editors/VSEditor.java')
-rw-r--r--sources/prefs/editors/VSEditor.java28
1 files changed, 24 insertions, 4 deletions
diff --git a/sources/prefs/editors/VSEditor.java b/sources/prefs/editors/VSEditor.java
index 0d00bab..d8e3222 100644
--- a/sources/prefs/editors/VSEditor.java
+++ b/sources/prefs/editors/VSEditor.java
@@ -35,6 +35,7 @@ public abstract class VSEditor implements ActionListener {
public static final int SIMULATION_PREFERENCES = 1;
private VSFrame frame;
protected VSEditorTable editTable;
+ private boolean expertModeChanged;
public VSEditor(VSPrefs prefs, VSPrefs prefsToEdit) {
init(prefs, prefsToEdit);
@@ -91,10 +92,16 @@ public abstract class VSEditor implements ActionListener {
private ArrayList<String> filterKeys(Set<String> set) {
ArrayList<String> filtered = new ArrayList<String>();
-
- for (String elem : set)
- if (!elem.startsWith("lang.") && !elem.startsWith("keyevent"))
- filtered.add(elem);
+ boolean expertMode = prefs.getBoolean("sim.mode.expert");
+
+ for (String elem : set) {
+ if (!elem.startsWith("lang.") && !elem.startsWith("keyevent")) {
+ if (expertMode)
+ filtered.add(elem);
+ else if (!elem.startsWith("col.") && (!elem.startsWith("div.")))
+ filtered.add(elem);
+ }
+ }
return filtered;
}
@@ -394,6 +401,8 @@ public abstract class VSEditor implements ActionListener {
}
protected void savePrefs() {
+ boolean expertMode = prefs.getBoolean("sim.mode.expert");
+
int i = 0;
for (String key : integerKeys) {
JComboBox valComboBox = integerFields.get(key);
@@ -438,6 +447,17 @@ public abstract class VSEditor implements ActionListener {
JTextField valField = stringFields.get(key);
prefsToEdit.setString(key, valField.getText());
}
+
+ expertModeChanged = expertMode != prefs.getBoolean("sim.mode.expert");
+ }
+
+ public boolean expertModeChanged() {
+ boolean ret = expertModeChanged;
+
+ if (expertModeChanged)
+ expertModeChanged = false;
+
+ return ret;
}
public void actionPerformed(ActionEvent e) {