home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD 31 / SUPERCDa.iso / Inet / HotJava / hjava.exe / InstallerData / lax.jar / com / zerog / lax / ZGMRJAppEventUtils.class (.txt) < prev   
Encoding:
Java Class File  |  1999-01-21  |  1.6 KB  |  55 lines

  1. package com.zerog.lax;
  2.  
  3. import com.apple.mrj.MRJAboutHandler;
  4. import com.apple.mrj.MRJApplicationUtils;
  5. import com.apple.mrj.MRJOpenDocumentHandler;
  6. import com.apple.mrj.MRJPrintDocumentHandler;
  7. import com.apple.mrj.MRJQuitHandler;
  8. import java.io.File;
  9.  
  10. class ZGMRJAppEventUtils implements MRJAboutHandler, MRJOpenDocumentHandler, MRJPrintDocumentHandler, MRJQuitHandler {
  11.    private static ZGMRJAppEventUtils thisInstance = new ZGMRJAppEventUtils();
  12.  
  13.    private ZGMRJAppEventUtils() {
  14.       new Integer(4);
  15.       new StringBuffer();
  16.    }
  17.  
  18.    public void handleAbout() {
  19.       new Integer(4);
  20.       new StringBuffer();
  21.       ZGAppEventUtils.appEvent(1);
  22.    }
  23.  
  24.    public void handleQuit() {
  25.       new Integer(4);
  26.       new StringBuffer();
  27.       ZGAppEventUtils.appEvent(2);
  28.    }
  29.  
  30.    public void handleOpenFile(File var1) {
  31.       new Integer(4);
  32.       new StringBuffer();
  33.       ZGAppEventUtils.fileEvent(3, var1.getPath());
  34.    }
  35.  
  36.    public void handlePrintFile(File var1) {
  37.       new Integer(4);
  38.       new StringBuffer();
  39.       ZGAppEventUtils.fileEvent(4, var1.getPath());
  40.    }
  41.  
  42.    protected static void registerWithMRJ() throws ClassNotFoundException {
  43.       new Integer(4);
  44.       new StringBuffer();
  45.       if (MRJApplicationUtils.isMRJToolkitAvailable()) {
  46.          MRJApplicationUtils.registerAboutHandler(thisInstance);
  47.          MRJApplicationUtils.registerOpenDocumentHandler(thisInstance);
  48.          MRJApplicationUtils.registerPrintDocumentHandler(thisInstance);
  49.          MRJApplicationUtils.registerQuitHandler(thisInstance);
  50.       } else {
  51.          throw new ClassNotFoundException("MRJToolkit Not Available");
  52.       }
  53.    }
  54. }
  55.