home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 October / PCO1097.ISO / FilesBBS / WIN95 / IAVAZIP.EXE / DATA.Z / htmlView.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-08-18  |  1.5 KB  |  50 lines

  1. package com.sfs.iavazip.viewer;
  2.  
  3. import com.sfs.debug.Debug;
  4. import com.sfs.html.HtmlViewer;
  5. import java.awt.BorderLayout;
  6. import java.awt.Container;
  7. import java.awt.Frame;
  8. import java.net.URL;
  9.  
  10. public class htmlView extends Viewer {
  11.    Frame parent;
  12.    HtmlViewer html;
  13.  
  14.    public void setArgs(Frame var1, String var2) {
  15.       URL var3 = null;
  16.  
  17.       try {
  18.          String var4 = "file:///" + System.getProperty("user.dir") + "/";
  19.          URL var7 = new URL(var4);
  20.          var3 = new URL(var7, var2);
  21.          Debug.Info(var3.toString());
  22.       } catch (Exception var6) {
  23.          this.flush();
  24.          Debug.Info("error" + ((Throwable)var6).getMessage());
  25.          ((Throwable)var6).printStackTrace(System.out);
  26.       }
  27.  
  28.       this.html = new HtmlViewer(var3, false);
  29.       if (this.html != null) {
  30.          ((Container)this).add("Center", this.html);
  31.       } else {
  32.          Debug.Info("html is null");
  33.       }
  34.  
  35.       ((Container)this).doLayout();
  36.    }
  37.  
  38.    public htmlView() {
  39.       ((Container)this).setLayout(new BorderLayout());
  40.    }
  41.  
  42.    public void flush() {
  43.       if (this.html != null) {
  44.          ((Container)this).remove(this.html);
  45.          this.html = null;
  46.       }
  47.  
  48.    }
  49. }
  50.