< prev index next >
src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2011, 2018, 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) 2011, 2019, 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
*** 322,332 ****
setGraphicsConfig(gc);
return false;
}
protected final Graphics getOnscreenGraphics(Color fg, Color bg, Font f) {
! if (getSurfaceData() == null) {
return null;
}
if (fg == null) {
fg = SystemColor.windowText;
}
--- 322,333 ----
setGraphicsConfig(gc);
return false;
}
protected final Graphics getOnscreenGraphics(Color fg, Color bg, Font f) {
! SurfaceData surfaceData = getSurfaceData();
! if (surfaceData == null) {
return null;
}
if (fg == null) {
fg = SystemColor.windowText;
}
*** 334,344 ****
bg = SystemColor.window;
}
if (f == null) {
f = DEFAULT_FONT;
}
! return new SunGraphics2D(getSurfaceData(), fg, bg, f);
}
@Override
public void setBounds(int x, int y, int w, int h, int op) {
--- 335,345 ----
bg = SystemColor.window;
}
if (f == null) {
f = DEFAULT_FONT;
}
! return new SunGraphics2D(surfaceData, fg, bg, f);
}
@Override
public void setBounds(int x, int y, int w, int h, int op) {
< prev index next >