src/share/classes/java/awt/peer/FramePeer.java

Print this page

        

@@ -26,10 +26,11 @@
 package java.awt.peer;
 
 import java.awt.*;
 
 import sun.awt.EmbeddedFrame;
+import sun.awt.image.OffScreenImage;
 
 /**
  * The peer interface for {@link Frame}. This adds a couple of frame specific
  * methods to the {@link WindowPeer} interface.
  *

@@ -129,6 +130,19 @@
      * Requests the peer to emulate window activation.
      *
      * @param activate activate or deactivate the window
      */
     void emulateActivation(boolean activate);
+    
+    /**
+     * Notifies that the scale factor has changed.
+     * The method is used by the LightweightFrame Mac implementation.
+     */
+    default void notifyScaleFactorChanged() {}
+    
+    /**
+     * Creates a HiDPI back buffer image with a scale factor matching
+     * the scale of the frame (which is an internal value).
+     * The method is currently used by the LightweightFrame Mac implementation.
+     */
+    default OffScreenImage createHiDPIImage(int width, int height) { return null; }
 }