001: /*
002: * GlobalOptions.java - Global options dialog
003: * :tabSize=8:indentSize=8:noTabs=false:
004: * :folding=explicit:collapseFolds=1:
005: *
006: * Copyright (C) 2002 Slava Pestov
007: *
008: * This program is free software; you can redistribute it and/or
009: * modify it under the terms of the GNU General Public License
010: * as published by the Free Software Foundation; either version 2
011: * of the License, or any later version.
012: *
013: * This program is distributed in the hope that it will be useful,
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
016: * GNU General Public License for more details.
017: *
018: * You should have received a copy of the GNU General Public License
019: * along with this program; if not, write to the Free Software
020: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
021: */
022:
023: package org.gjt.sp.jedit.options;
024:
025: //{{{ Imports
026: import java.awt.Dialog;
027: import java.awt.Frame;
028: import org.gjt.sp.jedit.gui.OptionsDialog;
029: import org.gjt.sp.jedit.msg.PropertiesChanging;
030: import org.gjt.sp.jedit.options.*;
031: import org.gjt.sp.jedit.*;
032: import org.gjt.sp.util.Log;
033:
034: //}}}
035:
036: public class GlobalOptions extends OptionsDialog {
037: //{{{ GlobalOptions constructor
038: public GlobalOptions(Frame frame) {
039: super (frame, "options", jEdit.getProperty("options.last"));
040: } //}}}
041:
042: //{{{ GlobalOptions constructor
043: public GlobalOptions(Frame frame, String pane) {
044: super (frame, "options", pane);
045: } //}}}
046:
047: //{{{ GlobalOptions constructor
048: public GlobalOptions(Dialog dialog) {
049: super (dialog, "options", jEdit.getProperty("options.last"));
050: } //}}}
051:
052: //{{{ GlobalOptions constructor
053: public GlobalOptions(Dialog dialog, String pane) {
054: super (dialog, "options", pane);
055: } //}}}
056:
057: //{{{ createOptionTreeModel() method
058: protected OptionTreeModel createOptionTreeModel() {
059: OptionTreeModel paneTreeModel = new OptionTreeModel();
060: OptionGroup rootGroup = (OptionGroup) paneTreeModel.getRoot();
061:
062: // initialize the jEdit branch of the options tree
063: jEditGroup = new OptionGroup("jedit");
064:
065: jEditGroup.addOptionPane("general");
066: jEditGroup.addOptionPane("abbrevs");
067: jEditGroup.addOptionPane("appearance");
068: jEditGroup.addOptionPane("context");
069: jEditGroup.addOptionPane("docking");
070: jEditGroup.addOptionPane("editing");
071: jEditGroup.addOptionPane("encodings");
072: jEditGroup.addOptionPane("gutter");
073: jEditGroup.addOptionPane("mouse");
074: jEditGroup.addOptionPane("plugin-manager");
075: jEditGroup.addOptionPane("print");
076: jEditGroup.addOptionPane("firewall");
077: jEditGroup.addOptionPane("save-back");
078: jEditGroup.addOptionPane("shortcuts");
079: jEditGroup.addOptionPane("status");
080: jEditGroup.addOptionPane("syntax");
081: jEditGroup.addOptionPane("textarea");
082: jEditGroup.addOptionPane("toolbar");
083: jEditGroup.addOptionPane("view");
084: rootGroup.addOptionGroup(jEditGroup);
085:
086: browserGroup = new OptionGroup("browser");
087: browserGroup.addOptionPane("browser.general");
088: browserGroup.addOptionPane("browser.colors");
089: rootGroup.addOptionGroup(browserGroup);
090:
091: return paneTreeModel;
092: } //}}}
093:
094: //{{{ cancel() method
095: public void cancel() {
096: EditBus.send(new PropertiesChanging(null,
097: PropertiesChanging.State.CANCELED));
098: super .cancel();
099: } //}}}
100:
101: //{{{ init() method
102: protected void init(String name, String pane) {
103: EditBus.send(new PropertiesChanging(null,
104: PropertiesChanging.State.LOADING));
105: super .init(name, pane);
106: } //}}}
107:
108: //{{{ getDefaultGroup() method
109: protected OptionGroup getDefaultGroup() {
110: return null;
111: } //}}}
112:
113: //{{{ Private members
114: private OptionGroup jEditGroup;
115: private OptionGroup browserGroup;
116: //}}}
117: }
|