PageRenderTime 143ms CodeModel.GetById 133ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-3-pre5/org/gjt/sp/jedit/options/GlobalOptions.java

#
Java | 107 lines | 62 code | 13 blank | 32 comment | 0 complexity | 430cd0c2b6d4c4f9b94e9cc8ef932acc MD5 | raw file
  1/*
  2 * GlobalOptions.java - Global options dialog
  3 * :tabSize=8:indentSize=8:noTabs=false:
  4 * :folding=explicit:collapseFolds=1:
  5 *
  6 * Copyright (C) 2002 Slava Pestov
  7 *
  8 * This program is free software; you can redistribute it and/or
  9 * 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
 23package org.gjt.sp.jedit.options;
 24
 25//{{{ Imports
 26import java.awt.Dialog;
 27import java.awt.Frame;
 28import org.gjt.sp.jedit.gui.OptionsDialog;
 29import org.gjt.sp.jedit.options.*;
 30import org.gjt.sp.jedit.*;
 31import org.gjt.sp.util.Log;
 32//}}}
 33
 34public class GlobalOptions extends OptionsDialog
 35{
 36	//{{{ GlobalOptions constructor
 37	public GlobalOptions(Frame frame)
 38	{
 39		super(frame,"options",jEdit.getProperty("options.last"));
 40	} //}}}
 41
 42	//{{{ GlobalOptions constructor
 43	public GlobalOptions(Frame frame, String pane)
 44	{
 45		super(frame,"options",pane);
 46	} //}}}
 47
 48	//{{{ GlobalOptions constructor
 49	public GlobalOptions(Dialog dialog)
 50	{
 51		super(dialog,"options",jEdit.getProperty("options.last"));
 52	} //}}}
 53
 54	//{{{ GlobalOptions constructor
 55	public GlobalOptions(Dialog dialog, String pane)
 56	{
 57		super(dialog,"options",pane);
 58	} //}}}
 59
 60	//{{{ createOptionTreeModel() method
 61	protected OptionTreeModel createOptionTreeModel()
 62	{
 63		OptionTreeModel paneTreeModel = new OptionTreeModel();
 64		OptionGroup rootGroup = (OptionGroup) paneTreeModel.getRoot();
 65
 66		// initialize the jEdit branch of the options tree
 67		jEditGroup = new OptionGroup("jedit");
 68
 69		jEditGroup.addOptionPane("abbrevs");
 70		jEditGroup.addOptionPane("appearance");
 71		jEditGroup.addOptionPane("context");
 72		jEditGroup.addOptionPane("docking");
 73		jEditGroup.addOptionPane("editing");
 74		jEditGroup.addOptionPane("general");
 75		jEditGroup.addOptionPane("gutter");
 76		jEditGroup.addOptionPane("mouse");
 77		jEditGroup.addOptionPane("print");
 78		jEditGroup.addOptionPane("plugin-manager");
 79		jEditGroup.addOptionPane("firewall");
 80		jEditGroup.addOptionPane("save-back");
 81		jEditGroup.addOptionPane("shortcuts");
 82		jEditGroup.addOptionPane("status");
 83		jEditGroup.addOptionPane("syntax");
 84		jEditGroup.addOptionPane("textarea");
 85		jEditGroup.addOptionPane("toolbar");
 86		jEditGroup.addOptionPane("view");
 87		rootGroup.addOptionGroup(jEditGroup);
 88
 89		browserGroup = new OptionGroup("browser");
 90		browserGroup.addOptionPane("browser.general");
 91		browserGroup.addOptionPane("browser.colors");
 92		rootGroup.addOptionGroup(browserGroup);
 93
 94		return paneTreeModel;
 95	} //}}}
 96
 97	//{{{ getDefaultGroup() method
 98	protected OptionGroup getDefaultGroup()
 99	{
100		return null;
101	} //}}}
102
103	//{{{ Private members
104	private OptionGroup jEditGroup;
105	private OptionGroup browserGroup;
106	//}}}
107}