home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &… the Search for Life CD 3 / 0_CD-ROM.iso / install / jre1_3 / lib / rt.jar / sun / awt / Win32GraphicsEnvironment.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.3 KB  |  39 lines

  1. package sun.awt;
  2.  
  3. import java.awt.GraphicsDevice;
  4. import java.awt.print.PrinterJob;
  5. import java.security.AccessController;
  6. import sun.awt.windows.WPrinterJob;
  7. import sun.java2d.SunGraphicsEnvironment;
  8. import sun.security.action.LoadLibraryAction;
  9.  
  10. public class Win32GraphicsEnvironment extends SunGraphicsEnvironment {
  11.    private static native void initDisplay();
  12.  
  13.    protected native int getNumScreens();
  14.  
  15.    protected GraphicsDevice makeScreenDevice(int var1) {
  16.       return new Win32GraphicsDevice(var1);
  17.    }
  18.  
  19.    protected String getOsVersion() {
  20.       String var1 = System.getProperty("os.name");
  21.       String var2 = System.getProperty("os.version");
  22.       return var1.equals("Windows NT") ? "NT" + var2 : var2;
  23.    }
  24.  
  25.    public PrinterJob getPrinterJob() {
  26.       SecurityManager var1 = System.getSecurityManager();
  27.       if (var1 != null) {
  28.          var1.checkPrintJobAccess();
  29.       }
  30.  
  31.       return new WPrinterJob();
  32.    }
  33.  
  34.    static {
  35.       AccessController.doPrivileged(new LoadLibraryAction("awt"));
  36.       initDisplay();
  37.    }
  38. }
  39.