1    /*
2    Copyright 2001 by Ralph Hartley
3    This software is licenced under the terms of the
4    Gnu Public Licence
5    */
6    
7    import javax.swing.*;
8    import java.awt.event.*;
9    import java.awt.*;
10   import java.util.*;
11   
12   public class PrefDebug extends PrefEditor implements java.io.Serializable {
13   
14     private static final long serialVersionUID = Version.getSUID();
15   
16     public boolean showwarnings = false;
17     public int maxerrors = 10;
18     public String errorfilename = "error.txt";
19   
20   //  public boolean originpre = true;
21   
22     public PrefDebug() {
23       name = "Debug";
24     }
25   
26     public void newPane()  throws NoSuchFieldException {
27       pane = new javax.swing.Box(BoxLayout.Y_AXIS);
28       setParm("showwarnings","Show low level warnings (that only programers need to see)");
29       setParm("maxerrors","Maximum number of errors to record");
30       setParm("errorfilename","Name of error file");
31   //    setParm("originpre","originpre (temp)");
32     }
33   
34     public void save() {
35       if (pane==null) return;
36       super.save();
37       apply();
38     }
39   
40     public void apply() {
41       ErrorLog.showwarnings = showwarnings;
42       ErrorLog.maxerrors = maxerrors;
43       ErrorLog.errorfilename = errorfilename;
44   //    Sub.originpre = originpre;
45     }
46   }
47   
48   
49