src/macosx/classes/sun/lwawt/LWLightweightFramePeer.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 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
--- 1,7 ----
/*
! * Copyright (c) 2014, 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
*** 24,41 ****
--- 24,44 ----
*/
package sun.lwawt;
import java.awt.Graphics;
+ import java.awt.GraphicsConfiguration;
import java.awt.Insets;
import java.awt.Point;
import java.awt.Rectangle;
+ import java.awt.Transparency;
import java.awt.Window;
import java.awt.dnd.DropTarget;
import sun.awt.CausedFocusEvent;
import sun.awt.LightweightFrame;
+ import sun.awt.image.OffScreenImage;
import sun.swing.JLightweightFrame;
import sun.swing.SwingAccessor;
public class LWLightweightFramePeer extends LWWindowPeer {
*** 112,117 ****
--- 115,133 ----
@Override
public void updateCursorImmediately() {
SwingAccessor.getJLightweightFrameAccessor().updateCursor((JLightweightFrame)getLwTarget());
}
+
+ @Override
+ public OffScreenImage createHiDPIImage(int width, int height) {
+ OffScreenImage img = OffScreenImage.create(getLwTarget(), (GraphicsConfiguration)getLWGC(),
+ width, height, Transparency.OPAQUE,
+ getLwTarget().getScaleFactor());
+ return img;
+ }
+
+ @Override
+ public void notifyScaleFactorChanged() {
+ displayChanged();
+ }
}