home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 October / PCO1097.ISO / FilesBBS / FREI / DIGSIM.EXE / AnalyzerFrame.class (.txt) next >
Encoding:
Java Class File  |  1996-05-21  |  1.2 KB  |  41 lines

  1. import java.awt.BorderLayout;
  2. import java.awt.Component;
  3. import java.awt.Container;
  4. import java.awt.Event;
  5. import java.awt.Frame;
  6. import java.awt.Graphics;
  7. import java.awt.Window;
  8.  
  9. class AnalyzerFrame extends Frame {
  10.    DigSim applet;
  11.    AnalyzerPanel MyAnalyzerPanel;
  12.  
  13.    public AnalyzerFrame(DigSim var1) {
  14.       super("Logic analyzer");
  15.       this.applet = var1;
  16.       ((Container)this).setLayout(new BorderLayout());
  17.       ((Container)this).add("Center", this.MyAnalyzerPanel = new AnalyzerPanel(var1, this));
  18.       ((Component)this).resize(400, 250);
  19.       ((Window)this).show();
  20.       ((Component)this).resize(400, 250);
  21.       ((Component)this).repaint();
  22.    }
  23.  
  24.    public void paint(Graphics var1) {
  25.       if (this.MyAnalyzerPanel != null) {
  26.          this.MyAnalyzerPanel.repaint();
  27.       }
  28.  
  29.    }
  30.  
  31.    public boolean handleEvent(Event var1) {
  32.       if (var1.id == 201) {
  33.          ((Component)this).hide();
  34.          this.applet.MyAnalyzerFrame = null;
  35.          return true;
  36.       } else {
  37.          return super.handleEvent(var1);
  38.       }
  39.    }
  40. }
  41.