01: /*
02: * JSGeneralOptionPane.java - JavaStyle general options panel
03: * Copyright (C) 2000,2001 Dirk Moebius
04: *
05: * jEdit buffer options:
06: * :tabSize=4:indentSize=4:noTabs=false:maxLineLen=0:
07: *
08: * This program is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU General Public License
10: * as published by the Free Software Foundation; either version 2
11: * of the License, or any later version.
12: *
13: * This program is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16: * GNU General Public License for more details.
17: *
18: * You should have received a copy of the GNU General Public License
19: * along with this program; if not, write to the Free Software
20: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21: */
22: package org.acm.seguin.ide.common.options;
23:
24: import javax.swing.JCheckBox;
25: import javax.swing.JTextField;
26:
27: /**
28: * @author Mike Atkinson (<a href="mailto:javastyle@ladyshot.demon.co.uk">
29: * Mike@ladyshot.demon.co.uk</a> )
30: * @author Dirk Moebius (<a href="mailto:dmoebius@gmx.net">
31: * dmoebius@gmx.net </a> )
32: * @created 04 September 2003
33: * @version $Version: $
34: * @since 1.0
35: */
36: public class JSGeneralOptionPane extends JSHelpOptionPane {
37:
38: //private JCheckBox formatOnSave;
39: private SelectedPanel formatOnSave_sp;
40: private SelectedPanel checkOnSave_sp;
41: private SelectedPanel jdk_sp;
42:
43: /**
44: * Constructor for the JSGeneralOptionPane object
45: *
46: * @param project Description of the Parameter
47: */
48: public JSGeneralOptionPane(String project) {
49: super ("javastyle.general", "pretty", project);
50: }
51:
52: /** Description of the Method */
53: public void _init() {
54: // "Reformat when buffer is saved"
55: formatOnSave_sp = addComponent("formatOnSave", "formatOnSave",
56: new JCheckBox());
57: checkOnSave_sp = addComponent("checkOnSave", "checkOnSave",
58: new JCheckBox());
59: //-- general options
60: addSeparator("general-opt.label");
61: jdk_sp = addComponent("jdk", "jdk", new JTextField(5));
62:
63: addHelpArea();
64: }
65:
66: /**
67: * Called when the options dialog's `OK' button is pressed. This should
68: * save any properties saved in this option pane.
69: */
70: public void _save() {
71: formatOnSave_sp.save();
72: checkOnSave_sp.save();
73: jdk_sp.save();
74: }
75:
76: }
|