1 22 23 package org.gjt.sp.jedit.options; 24 25 import java.awt.Dialog ; 27 import java.awt.Frame ; 28 import org.gjt.sp.jedit.gui.OptionsDialog; 29 import org.gjt.sp.jedit.msg.PropertiesChanging; 30 import org.gjt.sp.jedit.options.*; 31 import org.gjt.sp.jedit.*; 32 import org.gjt.sp.util.Log; 33 35 public class GlobalOptions extends OptionsDialog 36 { 37 public GlobalOptions(Frame frame) 39 { 40 super(frame,"options",jEdit.getProperty("options.last")); 41 } 43 public GlobalOptions(Frame frame, String pane) 45 { 46 super(frame,"options",pane); 47 } 49 public GlobalOptions(Dialog dialog) 51 { 52 super(dialog,"options",jEdit.getProperty("options.last")); 53 } 55 public GlobalOptions(Dialog dialog, String pane) 57 { 58 super(dialog,"options",pane); 59 } 61 protected OptionTreeModel createOptionTreeModel() 63 { 64 OptionTreeModel paneTreeModel = new OptionTreeModel(); 65 OptionGroup rootGroup = (OptionGroup) paneTreeModel.getRoot(); 66 67 jEditGroup = new OptionGroup("jedit"); 69 70 jEditGroup.addOptionPane("general"); 71 jEditGroup.addOptionPane("abbrevs"); 72 jEditGroup.addOptionPane("appearance"); 73 jEditGroup.addOptionPane("context"); 74 jEditGroup.addOptionPane("docking"); 75 jEditGroup.addOptionPane("editing"); 76 jEditGroup.addOptionPane("encodings"); 77 jEditGroup.addOptionPane("gutter"); 78 jEditGroup.addOptionPane("mouse"); 79 jEditGroup.addOptionPane("plugin-manager"); 80 jEditGroup.addOptionPane("print"); 81 jEditGroup.addOptionPane("firewall"); 82 jEditGroup.addOptionPane("save-back"); 83 jEditGroup.addOptionPane("shortcuts"); 84 jEditGroup.addOptionPane("status"); 85 jEditGroup.addOptionPane("syntax"); 86 jEditGroup.addOptionPane("textarea"); 87 jEditGroup.addOptionPane("toolbar"); 88 jEditGroup.addOptionPane("view"); 89 rootGroup.addOptionGroup(jEditGroup); 90 91 browserGroup = new OptionGroup("browser"); 92 browserGroup.addOptionPane("browser.general"); 93 browserGroup.addOptionPane("browser.colors"); 94 rootGroup.addOptionGroup(browserGroup); 95 96 return paneTreeModel; 97 } 99 public void cancel() 101 { 102 EditBus.send( 103 new PropertiesChanging(null, 104 PropertiesChanging.State.CANCELED)); 105 super.cancel(); 106 } 108 protected void init(String name, String pane) 110 { 111 EditBus.send( 112 new PropertiesChanging(null, 113 PropertiesChanging.State.LOADING)); 114 super.init(name, pane); 115 } 117 protected OptionGroup getDefaultGroup() 119 { 120 return null; 121 } 123 private OptionGroup jEditGroup; 125 private OptionGroup browserGroup; 126 } 128 | Popular Tags |