summaryrefslogtreecommitdiff
path: root/sources/prefs/editors/VSEditor.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-21 01:54:06 +0000
committerPaul Buetow <paul@buetow.org>2008-05-21 01:54:06 +0000
commit6059b54e23e742db068da5e4a53b8b1b046db121 (patch)
tree72e51fefd35efe5d013d16b4ac26240d7216660f /sources/prefs/editors/VSEditor.java
parent8d5c21477617e4d08bd098069c7628830675abb7 (diff)
Introduced a new VSEditorFrame.
No more need for the VSProtcolEditor!
Diffstat (limited to 'sources/prefs/editors/VSEditor.java')
-rw-r--r--sources/prefs/editors/VSEditor.java28
1 files changed, 26 insertions, 2 deletions
diff --git a/sources/prefs/editors/VSEditor.java b/sources/prefs/editors/VSEditor.java
index dc87a34..5b60e75 100644
--- a/sources/prefs/editors/VSEditor.java
+++ b/sources/prefs/editors/VSEditor.java
@@ -39,6 +39,7 @@ abstract class VSEditor implements ActionListener {
//protected Insets insetsTopSpaceing = new Insets(15, 0, 0, 0);
protected Insets insetsTopSpaceing = new Insets(0, 0, 0, 0);
protected Insets insets = new Insets(0, 0, 0, 0);
+ private VSFrame frame;
public VSEditor(VSPrefs prefs, VSPrefs prefsToEdit) {
init(prefs, prefsToEdit, SIMULATION_PREFERENCES);
@@ -48,6 +49,31 @@ abstract class VSEditor implements ActionListener {
init(prefs, prefsToEdit, prefsCategory);
}
+ public int getPrefsCategory() {
+ return prefsCategory;
+ }
+
+ public void setPrefs(VSPrefs prefs) {
+ this.prefs = prefs;
+ }
+
+ public void setPrefsToEdit(VSPrefs prefsToEdit) {
+ this.prefsToEdit = prefsToEdit;
+ }
+
+ public void setFrame(VSFrame frame) {
+ this.frame = frame;
+ }
+
+ public VSFrame getFrame() {
+ return frame;
+ }
+
+ protected void disposeFrameIfExists() {
+ if (frame != null)
+ frame.dispose();
+ }
+
private void init(VSPrefs prefs, VSPrefs prefsToEdit, int prefsCategory) {
this.prefs = prefs;
this.prefsToEdit = prefsToEdit;
@@ -509,6 +535,4 @@ abstract class VSEditor implements ActionListener {
public JPanel getButtonPanel() {
return buttonPanel;
}
-
- abstract protected JFrame getFrame();
}