summaryrefslogtreecommitdiff
path: root/sources/prefs/editors/VSEditor.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-26 13:55:22 +0000
committerPaul Buetow <paul@buetow.org>2008-05-26 13:55:22 +0000
commit9ffbf6d8b94e8ae40ebc291eab6bd96aff3477b0 (patch)
tree4b0e3f59bee77c51663044ef331fc47413c78758 /sources/prefs/editors/VSEditor.java
parent71d9caff2cc21a39971b69670c481c28b0399b9c (diff)
all relevant variables now do have units.
Diffstat (limited to 'sources/prefs/editors/VSEditor.java')
-rw-r--r--sources/prefs/editors/VSEditor.java22
1 files changed, 14 insertions, 8 deletions
diff --git a/sources/prefs/editors/VSEditor.java b/sources/prefs/editors/VSEditor.java
index 0264e2b..35bacea 100644
--- a/sources/prefs/editors/VSEditor.java
+++ b/sources/prefs/editors/VSEditor.java
@@ -256,12 +256,12 @@ public abstract class VSEditor implements ActionListener {
*
* @return the j panel
*/
- private JPanel createUnitPanel(Component comp, String key) {
+ private JPanel createUnitPanel(VSPrefs prefsToEdit, Component comp, String fullKey) {
JPanel unitPanel = new JPanel(new GridBagLayout());
unitPanel.setBackground(Color.WHITE);
unitPanel.setBorder(null);
- String unitText = prefs.getUnit(key);
+ String unitText = prefsToEdit.getUnit(fullKey);
if (unitText == null)
unitText = "";
@@ -327,7 +327,8 @@ public abstract class VSEditor implements ActionListener {
valComboBox.addItem(new Integer(i));
valComboBox.setBorder(null);
- return new VSTupel<String,Component,JComboBox>(label, createUnitPanel(valComboBox, fullKey), valComboBox);
+ return new VSTupel<String,Component,JComboBox>(label,
+ createUnitPanel(prefsToEdit, valComboBox, fullKey), valComboBox);
}
/**
@@ -346,7 +347,8 @@ public abstract class VSEditor implements ActionListener {
JCheckBox valField = new JCheckBox(activated, prefsToEdit.getBoolean(key));
valField.setBackground(Color.WHITE);
valField.setBorder(null);
- return new VSTupel<String,Component,JCheckBox>(label, createUnitPanel(valField, fullKey), valField);
+ return new VSTupel<String,Component,JCheckBox>(label,
+ createUnitPanel(prefsToEdit, valField, fullKey), valField);
}
/**
@@ -371,7 +373,8 @@ public abstract class VSEditor implements ActionListener {
});
valField.setText(""+prefsToEdit.getLong(key));
valField.setBorder(null);
- return new VSTupel<String,Component,JTextField>(label, createUnitPanel(valField, fullKey), valField);
+ return new VSTupel<String,Component,JTextField>(label,
+ createUnitPanel(prefsToEdit, valField, fullKey), valField);
}
/**
@@ -396,7 +399,8 @@ public abstract class VSEditor implements ActionListener {
});
valField.setText(""+prefsToEdit.getFloat(key));
valField.setBorder(null);
- return new VSTupel<String,Component,JTextField>(label, createUnitPanel(valField, fullKey), valField);
+ return new VSTupel<String,Component,JTextField>(label,
+ createUnitPanel(prefsToEdit, valField, fullKey), valField);
}
/**
@@ -437,7 +441,8 @@ public abstract class VSEditor implements ActionListener {
}
});
valField.setBorder(null);
- return new VSTupel<String,Component,JTextField>(label, createUnitPanel(valField, fullKey), valField);
+ return new VSTupel<String,Component,JTextField>(label,
+ createUnitPanel(prefsToEdit, valField, fullKey), valField);
}
/**
@@ -462,7 +467,8 @@ public abstract class VSEditor implements ActionListener {
});
valField.setText(prefsToEdit.getString(key));
valField.setBorder(null);
- return new VSTupel<String,Component,JTextField>(label, createUnitPanel(valField, fullKey), valField);
+ return new VSTupel<String,Component,JTextField>(label,
+ createUnitPanel(prefsToEdit, valField, fullKey), valField);
}
/**