src/share/classes/java/awt/DisplayMode.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -23,11 +23,11 @@
  * questions.
  */
 
 package java.awt;
 
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
 
 /**
  * The <code>DisplayMode</code> class encapsulates the bit depth, height,
  * width, and refresh rate of a <code>GraphicsDevice</code>. The ability to
  * change graphics device's display mode is platform- and

@@ -44,12 +44,10 @@
  * @see GraphicsDevice#setDisplayMode
  * @author Michael Martak
  * @since 1.4
  */
 
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
 public final class DisplayMode {
 
     private Dimension size;
     private int bitDepth;
     private int refreshRate;

@@ -92,11 +90,11 @@
     /**
      * Value of the bit depth if multiple bit depths are supported in this
      * display mode.
      * @see #getBitDepth
      */
-    public final static int BIT_DEPTH_MULTI = -1;
+    @Native public final static int BIT_DEPTH_MULTI = -1;
 
     /**
      * Returns the bit depth of the display, in bits per pixel.  This may be
      * <code>BIT_DEPTH_MULTI</code> if multiple bit depths are supported in
      * this display mode.

@@ -110,11 +108,11 @@
 
     /**
      * Value of the refresh rate if not known.
      * @see #getRefreshRate
      */
-    public final static int REFRESH_RATE_UNKNOWN = 0;
+    @Native public final static int REFRESH_RATE_UNKNOWN = 0;
 
     /**
      * Returns the refresh rate of the display, in hertz.  This may be
      * <code>REFRESH_RATE_UNKNOWN</code> if the information is not available.
      *