summaryrefslogtreecommitdiff
path: root/sources/prefs/editors/VSBetterEditor.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-21 19:01:48 +0000
committerPaul Buetow <paul@buetow.org>2008-05-21 19:01:48 +0000
commitdb4ae1c41883f6f78d8107429f7f4871c45f47d5 (patch)
treed84d754176060afddc89b00d6cf7d4b97d3d049f /sources/prefs/editors/VSBetterEditor.java
parent004458bb854fe4376fe35ec55d7f08853e08895b (diff)
Ok inline editor seems to work.
Diffstat (limited to 'sources/prefs/editors/VSBetterEditor.java')
-rw-r--r--sources/prefs/editors/VSBetterEditor.java40
1 files changed, 13 insertions, 27 deletions
diff --git a/sources/prefs/editors/VSBetterEditor.java b/sources/prefs/editors/VSBetterEditor.java
index 217b13b..da0a069 100644
--- a/sources/prefs/editors/VSBetterEditor.java
+++ b/sources/prefs/editors/VSBetterEditor.java
@@ -14,7 +14,7 @@ import utils.*;
public abstract class VSBetterEditor extends VSEditor {
private Container contentPane;
- protected VSInfoArea infoArea;
+ private VSInfoArea infoArea;
private String title;
public VSBetterEditor(VSPrefs prefs, VSPrefs prefsToEdit, String title) {
@@ -23,18 +23,12 @@ public abstract class VSBetterEditor extends VSEditor {
this.contentPane = createContentPane();
}
- public VSBetterEditor(VSPrefs prefs, VSPrefs prefsToEdit, String title, int prefsCategory) {
- super(prefs, prefsToEdit, prefsCategory);
- this.title = title;
- this.contentPane = createContentPane();
- }
-
public String getTitle() {
return title;
}
public Container getContentPane() {
- contentPane.setBackground(Color.WHITE);
+ contentPane.setBackground(Color.WHITE);
return contentPane;
}
@@ -43,32 +37,22 @@ public abstract class VSBetterEditor extends VSEditor {
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
infoArea = new VSInfoArea();
- JPanel editPanel = super.editPanel;
- JPanel buttonPanel = createButtonPanel();
+ JPanel editPanel = getEditPanel();
+ JPanel buttonPanel = getButtonPanel();
- //JScrollPane scrollPane = new JScrollPane(editPanel);
- panel.add(infoArea);
+ JScrollPane scrollPane = new JScrollPane(editPanel);
panel.add(editPanel);
+ //panel.add(infoArea);
panel.add(buttonPanel);
return panel;
}
- protected void addToEditPanelFront(JPanel editPanel) { }
-
- protected void addToEditPanelLast(JPanel editPanel) { }
+ protected void addToButtonPanelFront(JPanel buttonPanel) { }
+ protected void addToButtonPanelLast(JPanel buttonPanel) { }
- private JPanel createButtonPanel() {
- JPanel buttonPanel = super.buttonPanel;
-
- JButton cancelButton = new JButton(
- prefs.getString("lang.cancel"));
- cancelButton.setMnemonic(prefs.getInteger("keyevent.cancel"));
- cancelButton.addActionListener(this);
- buttonPanel.add(cancelButton);
-
- return buttonPanel;
- }
+ protected void addToEditPanelFront(JPanel editPanel, VSEditorTable editTable) { }
+ protected void addToEditPanelLast(JPanel editPanel, VSEditorTable editTable) { }
public void actionPerformed(ActionEvent e) {
//String actionCommand = e.getActionCommand();
@@ -77,5 +61,7 @@ public abstract class VSBetterEditor extends VSEditor {
super.actionPerformed(e);
}
- public void newVSEditorInstance(VSPrefs prefs, VSPrefs prefsToEdit, int prefsCategory) { };
+ protected VSInfoArea getInfoArea() {
+ return infoArea;
+ }
}