From db4ae1c41883f6f78d8107429f7f4871c45f47d5 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 21 May 2008 19:01:48 +0000 Subject: Ok inline editor seems to work. --- sources/prefs/editors/VSBetterEditor.java | 40 ++++++++++--------------------- 1 file changed, 13 insertions(+), 27 deletions(-) (limited to 'sources/prefs/editors/VSBetterEditor.java') 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; + } } -- cgit v1.2.3