From 9ffbf6d8b94e8ae40ebc291eab6bd96aff3477b0 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 26 May 2008 13:55:22 +0000 Subject: all relevant variables now do have units. --- sources/prefs/editors/VSEditor.java | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'sources/prefs/editors/VSEditor.java') 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(label, createUnitPanel(valComboBox, fullKey), valComboBox); + return new VSTupel(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(label, createUnitPanel(valField, fullKey), valField); + return new VSTupel(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(label, createUnitPanel(valField, fullKey), valField); + return new VSTupel(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(label, createUnitPanel(valField, fullKey), valField); + return new VSTupel(label, + createUnitPanel(prefsToEdit, valField, fullKey), valField); } /** @@ -437,7 +441,8 @@ public abstract class VSEditor implements ActionListener { } }); valField.setBorder(null); - return new VSTupel(label, createUnitPanel(valField, fullKey), valField); + return new VSTupel(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(label, createUnitPanel(valField, fullKey), valField); + return new VSTupel(label, + createUnitPanel(prefsToEdit, valField, fullKey), valField); } /** -- cgit v1.2.3