The R Project SVN R

Rev

Rev 5458 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5458 Rev 8090
Line 1... Line 1...
1
/*==============================================================================
1
/*============================================================================
2
 
2
 
3
  Project: 
3
  Project: 
4
  
4
  
5
  JAVA Source file for the class Tracer
5
  JAVA Source file for the class Tracer
6
  
6
  
7
  COPYRIGHT (C), 1998, Thomas Baier
7
  COPYRIGHT (C), 1998-2000, Thomas Baier, R Core development Team
8
  
8
  
9
 *  This program is free software; you can redistribute it and/or modify
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
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
11
 *  the Free Software Foundation; either version 2 of the License, or
12
 *  (at your option) any later version.
12
 *  (at your option) any later version.
Line 18... Line 18...
18
 *
18
 *
19
 *  You should have received a copy of the GNU General Public License
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
20
 *  along with this program; if not, write to the Free Software
21
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22
 
22
 
23
  $Source: /scratch/CVS-ARCHIVE/R/doc/html/search/Tracer.java,v $
-
 
24
  
-
 
25
  $Revision: 1.3 $
23
  $Revision: 1.4 $
26
 
24
 
27
  $Date: 1999/08/10 09:56:03 $
25
  $Date: 2000/02/10 17:03:55 $
28
  
26
  
29
  $Author: ripley $
27
  $Author: leisch $
30
 
-
 
31
==============================================================================*/
-
 
32
 
28
 
-
 
29
============================================================================*/
33
 
30
 
34
/* -------------------------------- Imports --------------------------------- */
-
 
35
 
31
 
36
import java.applet.*;
32
import java.applet.*;
37
import java.awt.*;
33
import java.awt.*;
38
import java.net.*;
34
import java.net.*;
39
import java.io.*;
35
import java.io.*;
40
 
36
 
41
 
-
 
42
 
-
 
43
/*==============================================================================
-
 
44
                          Interface of class Tracer
-
 
45
==============================================================================*/
-
 
46
 
-
 
47
/*------------------------------------------------------------------------------
-
 
48
  CLASS:    Tracer
-
 
49
  SUPER:    Frame
-
 
50
  CONF. TO: 
-
 
51
  PURPOSE:  provide a tracing interface for every browser
-
 
52
  NOTES:    
-
 
53
 
-
 
54
  HISTORY:  98-05-10: created
-
 
55
------------------------------------------------------------------------------*/
-
 
56
public class Tracer extends Frame
37
public class Tracer extends Frame
57
{
38
{
58
  /*============================================================================
-
 
59
                                Public methods
-
 
60
  ============================================================================*/
-
 
61
 
-
 
62
  /*----------------------------------------------------------------------------
-
 
63
    INTERFACE: 
-
 
64
    PURPOSE:   application front-end, create tracer if required, trace string
-
 
65
  	      
-
 
66
    NOTES:     
-
 
67
  
-
 
68
    PARAMS:    
-
 
69
    THROWS:    
-
 
70
    RETURNS:   void
-
 
71
  
-
 
72
    HISTORY:   98-05-10: created
-
 
73
  ----------------------------------------------------------------------------*/
-
 
74
  public static void write (String string)
39
  public static void write (String string)
75
  {
40
  {
76
    //create a trace window
41
    //create a trace window
-
 
42
    /*
77
//       if (cTracer == null) {
43
    if (cTracer == null) {
78
 //        cTracer = new Tracer ();
44
      cTracer = new Tracer ();
79
 //      }
45
    }
80
    
46
    
81
 //      cTracer._write (string);
47
    cTracer._write (string);
82
 
48
    */
83
    return;
49
    return;
84
  }
50
  }
85
 
51
 
86
 
-
 
87
  /*----------------------------------------------------------------------------
-
 
88
    INTERFACE: 
-
 
89
    PURPOSE:   
-
 
90
  	      
-
 
91
    NOTES:     
-
 
92
  
-
 
93
    PARAMS:    
-
 
94
    THROWS:    
-
 
95
    RETURNS:   void
-
 
96
  
-
 
97
    HISTORY:   98-05-10: created
-
 
98
  ----------------------------------------------------------------------------*/
-
 
99
  public static void start ()
52
  public static void start ()
100
  {
53
  {
-
 
54
    /*
101
  //  if (cTracer != null) {
55
    if (cTracer != null) {
102
  //    cTracer.show ();
56
      cTracer.show ();
103
 //   }
57
    }
104
 
58
    */
105
    return;
59
    return;
106
  }
60
  }
107
 
61
 
108
 
-
 
109
  /*----------------------------------------------------------------------------
-
 
110
    INTERFACE: 
-
 
111
    PURPOSE:   
-
 
112
  	      
-
 
113
    NOTES:     
-
 
114
  
-
 
115
    PARAMS:    
-
 
116
    THROWS:    
-
 
117
    RETURNS:   void
-
 
118
  
-
 
119
    HISTORY:   98-05-10: created
-
 
120
               98-11-14: replaced deprecated hide() with setVisible()
-
 
121
  ----------------------------------------------------------------------------*/
-
 
122
  public static void stop ()
62
  public static void stop ()
123
  {
63
  {
124
  //  if (cTracer != null) {
64
    //    if (cTracer != null) {
125
   //   cTracer.setVisible (false);
65
    //  cTracer.setVisible (false);
126
    //}
66
    //}
127
 
67
 
128
    return;
68
    return;
129
  }
69
  }
130
 
70
 
131
 
-
 
132
  /*============================================================================
-
 
133
                              Protected methods
-
 
134
  ============================================================================*/
-
 
135
 
-
 
136
  /*============================================================================
-
 
137
                               Private methods
-
 
138
  ============================================================================*/
-
 
139
 
-
 
140
  /*----------------------------------------------------------------------------
-
 
141
    INTERFACE: 
-
 
142
    PURPOSE:   default constructor
-
 
143
  	      
-
 
144
    NOTES:    
-
 
145
  
-
 
146
    PARAMS:   
-
 
147
    THROWS:    
-
 
148
    RETURNS:   void
-
 
149
  
-
 
150
    HISTORY:   98-05-10: created
-
 
151
  ----------------------------------------------------------------------------*/
-
 
152
  private Tracer ()
71
  private Tracer ()
153
  {
72
  {
154
    super ("Java Applet Tracer");
73
    super ("Java Applet Tracer");
155
 
74
 
156
    // construct a layout manager
75
    // construct a layout manager
Line 173... Line 92...
173
 
92
 
174
    return;
93
    return;
175
  }
94
  }
176
 
95
 
177
 
96
 
178
  /*----------------------------------------------------------------------------
-
 
179
    INTERFACE: 
-
 
180
    PURPOSE:   write a string to the tracer
-
 
181
  	      
-
 
182
    NOTES:     
-
 
183
  
-
 
184
    PARAMS:    
-
 
185
    THROWS:    
-
 
186
    RETURNS:   void
-
 
187
  
-
 
188
    HISTORY:   98-05-10: created
-
 
189
               98-11-14: replaced deprecated appendText() with append()
-
 
190
  ----------------------------------------------------------------------------*/
-
 
191
  private void _write (String string)
97
  private void _write (String string)
192
  {
98
  {
193
    iOutput.append (string);
99
    iOutput.append (string);
194
 
100
 
195
    return;
101
    return;
196
  }
102
  }
197
 
103
 
198
 
-
 
199
  /*============================================================================
-
 
200
                             Instance Variables
-
 
201
  ============================================================================*/
-
 
202
  private TextArea iOutput;
104
  private TextArea iOutput;
203
 
-
 
204
  /*============================================================================
-
 
205
                                Static Data
-
 
206
  ============================================================================*/
-
 
207
  private static Tracer cTracer = null;
105
  private static Tracer cTracer = null;
208
 
-
 
209
}
106
}
210
 
107
 
211
 
-
 
212
/*==============================================================================
-
 
213
 
-
 
214
  HISTORY:
-
 
215
  
-
 
216
  $Log: Tracer.java,v $
-
 
217
  Revision 1.3  1999/08/10 09:56:03  ripley
-
 
218
  change FSF address in copyrights
-
 
219
  add some copyrights in src/gnome and elsewhere
-
 
220
 
-
 
221
  Revision 1.2  1999/03/04 17:15:19  leisch
-
 
222
  various bugfixes
-
 
223
 
-
 
224
  Revision 1.1.4.1  1999/03/02 15:19:58  leisch
-
 
225
  search used only kewords, no titles
-
 
226
 
-
 
227
  Revision 1.3  1998/11/14 23:33:25  baier
-
 
228
  adjusted to JDK 1.1
-
 
229
 
-
 
230
  Revision 1.2  1998/05/10 22:57:14  baier
-
 
231
  tracer window disabled
-
 
232
 
-
 
233
  Revision 1.1  1998/05/10 02:44:44  baier
-
 
234
  Initial revision
-
 
235
 
-
 
236
 
-
 
237
==============================================================================*/
-
 
238
 
-
 
239
 
-
 
240
// Local Variables:
108
// Local Variables:
241
// mode: Java
109
// mode: Java
242
// mode: font-lock
110
// mode: font-lock
243
// End:
111
// End: