home *** CD-ROM | disk | FTP | other *** search
/ Print Shop Ensemble 3 / the-print-shop-ensemble-iii.iso / worldnet / disk2 / java.z / MOZ2_01.ZIP / netscape / applet / Console.class (.txt) < prev    next >
Encoding:
Java Class File  |  1996-03-08  |  1.4 KB  |  35 lines

  1. package netscape.applet;
  2.  
  3. import java.io.BufferedOutputStream;
  4. import java.io.PrintStream;
  5.  
  6. class Console {
  7.    ConsoleFrame frame = new ConsoleFrame(this);
  8.  
  9.    Console() {
  10.       System.in = new ConsoleInputStream(this);
  11.       System.out = new PrintStream(new BufferedOutputStream(new ConsoleOutputStream(this), 128), true);
  12.       System.err = System.out;
  13.    }
  14.  
  15.    void reset() {
  16.       this.frame.reset();
  17.    }
  18.  
  19.    void show() {
  20.       if (!this.frame.isVisible()) {
  21.          this.frame.show();
  22.          MozillaAppletContext.setConsoleState(1);
  23.       }
  24.  
  25.    }
  26.  
  27.    void hide() {
  28.       if (this.frame.isVisible()) {
  29.          this.frame.hide();
  30.          MozillaAppletContext.setConsoleState(0);
  31.       }
  32.  
  33.    }
  34. }
  35.