home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 139 / dpcs0999.iso / Web / CFserver / data1.cab / Java / netscape / application / FileChooser.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-04-12  |  1.8 KB  |  69 lines

  1. package netscape.application;
  2.  
  3. import java.awt.FileDialog;
  4. import java.io.FilenameFilter;
  5. import netscape.util.InconsistencyException;
  6.  
  7. public class FileChooser {
  8.    FileDialog awtDialog;
  9.    int type;
  10.    public static final int LOAD_TYPE = 0;
  11.    public static final int SAVE_TYPE = 1;
  12.  
  13.    public FileChooser(RootView var1, String var2, int var3) {
  14.       if (var1 == null) {
  15.          throw new InconsistencyException("No rootView for FileChooser");
  16.       } else {
  17.          this.type = var3;
  18.          byte var4;
  19.          if (var3 == 1) {
  20.             var4 = 1;
  21.          } else {
  22.             var4 = 0;
  23.          }
  24.  
  25.          this.awtDialog = new FileDialog(var1.panel().frame(), var2, var4);
  26.       }
  27.    }
  28.  
  29.    public int type() {
  30.       return this.type;
  31.    }
  32.  
  33.    public void setDirectory(String var1) {
  34.       this.awtDialog.setDirectory(var1);
  35.    }
  36.  
  37.    public String directory() {
  38.       return this.awtDialog.getDirectory();
  39.    }
  40.  
  41.    public void setFile(String var1) {
  42.       this.awtDialog.setFile(var1);
  43.    }
  44.  
  45.    public String file() {
  46.       return this.awtDialog.getFile();
  47.    }
  48.  
  49.    public void setFilenameFilter(FilenameFilter var1) {
  50.       this.awtDialog.setFilenameFilter(var1);
  51.    }
  52.  
  53.    public FilenameFilter filenameFilter() {
  54.       return this.awtDialog.getFilenameFilter();
  55.    }
  56.  
  57.    public void setTitle(String var1) {
  58.       this.awtDialog.setTitle(var1);
  59.    }
  60.  
  61.    public String title() {
  62.       return this.awtDialog.getTitle();
  63.    }
  64.  
  65.    public void showModally() {
  66.       this.awtDialog.show();
  67.    }
  68. }
  69.