The R Project SVN R

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
8090 leisch 1
/*============================================================================
1230 leisch 2
 
3
  Project: 
4
 
5
  JAVA Source file for the class Tracer
6
 
8090 leisch 7
  COPYRIGHT (C), 1998-2000, Thomas Baier, R Core development Team
1230 leisch 8
 
3765 leisch 9
 *  This program is free software; you can redistribute it and/or modify
10
 *  it under the terms of the GNU General Public License as published by
11
 *  the Free Software Foundation; either version 2 of the License, or
12
 *  (at your option) any later version.
13
 *
14
 *  This program is distributed in the hope that it will be useful,
15
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 *  GNU General Public License for more details.
18
 *
19
 *  You should have received a copy of the GNU General Public License
20
 *  along with this program; if not, write to the Free Software
5458 ripley 21
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22
 
8090 leisch 23
  $Revision: 1.4 $
1230 leisch 24
 
8090 leisch 25
  $Date: 2000/02/10 17:03:55 $
1230 leisch 26
 
8090 leisch 27
  $Author: leisch $
1230 leisch 28
 
8090 leisch 29
============================================================================*/
1230 leisch 30
 
31
 
32
import java.applet.*;
33
import java.awt.*;
34
import java.net.*;
35
import java.io.*;
36
 
37
public class Tracer extends Frame
38
{
39
  public static void write (String string)
40
  {
3765 leisch 41
    //create a trace window
8090 leisch 42
    /*
43
    if (cTracer == null) {
44
      cTracer = new Tracer ();
45
    }
3765 leisch 46
 
8090 leisch 47
    cTracer._write (string);
48
    */
1230 leisch 49
    return;
50
  }
51
 
52
  public static void start ()
53
  {
8090 leisch 54
    /*
55
    if (cTracer != null) {
56
      cTracer.show ();
57
    }
58
    */
1230 leisch 59
    return;
60
  }
61
 
62
  public static void stop ()
63
  {
8090 leisch 64
    //    if (cTracer != null) {
65
    //  cTracer.setVisible (false);
3765 leisch 66
    //}
1230 leisch 67
 
68
    return;
69
  }
70
 
71
  private Tracer ()
72
  {
73
    super ("Java Applet Tracer");
74
 
75
    // construct a layout manager
76
    GridBagLayout gridbag = new GridBagLayout ();
77
    GridBagConstraints constraints = new GridBagConstraints ();
78
    setLayout (gridbag);
79
    constraints.fill = GridBagConstraints.BOTH;
80
    constraints.weighty = 1.0;
81
    constraints.weightx = 1.0;
82
    constraints.gridwidth = GridBagConstraints.REMAINDER;
83
    constraints.gridheight = GridBagConstraints.REMAINDER;
84
 
85
    iOutput = new TextArea ();
86
 
87
    gridbag.setConstraints (iOutput,constraints);
88
    add (iOutput);
89
 
90
    show ();
91
    pack ();
92
 
93
    return;
94
  }
95
 
96
 
97
  private void _write (String string)
98
  {
3765 leisch 99
    iOutput.append (string);
1230 leisch 100
 
101
    return;
102
  }
103
 
104
  private TextArea iOutput;
105
  private static Tracer cTracer = null;
106
}
107
 
108
// Local Variables:
109
// mode: Java
110
// mode: font-lock
111
// End: