< prev index next >

src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1996, 2016, 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) 1996, 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
*** 45,54 **** --- 45,55 ---- import sun.awt.AWTAccessor; import sun.awt.AppContext; import sun.awt.AWTAutoShutdown; import sun.awt.AWTPermissions; import sun.awt.AppContext; + import sun.awt.DisplayChangedListener; import sun.awt.LightweightFrame; import sun.awt.SunToolkit; import sun.awt.util.ThreadGroupUtils; import sun.awt.Win32GraphicsDevice; import sun.awt.Win32GraphicsEnvironment;
*** 800,812 **** @Override public native int getMaximumCursorColors(); static void paletteChanged() { ! ((Win32GraphicsEnvironment)GraphicsEnvironment ! .getLocalGraphicsEnvironment()) ! .paletteChanged(); } /* * Called from Toolkit native code when a WM_DISPLAYCHANGE occurs. * Have Win32GraphicsEnvironment execute the display change code on the --- 801,814 ---- @Override public native int getMaximumCursorColors(); static void paletteChanged() { ! Object lge = GraphicsEnvironment.getLocalGraphicsEnvironment(); ! if (lge instanceof DisplayChangedListener) { ! ((DisplayChangedListener) lge).paletteChanged(); ! } } /* * Called from Toolkit native code when a WM_DISPLAYCHANGE occurs. * Have Win32GraphicsEnvironment execute the display change code on the
*** 814,826 **** */ public static void displayChanged() { EventQueue.invokeLater(new Runnable() { @Override public void run() { ! ((Win32GraphicsEnvironment)GraphicsEnvironment ! .getLocalGraphicsEnvironment()) ! .displayChanged(); } }); } /** --- 816,829 ---- */ public static void displayChanged() { EventQueue.invokeLater(new Runnable() { @Override public void run() { ! Object lge = GraphicsEnvironment.getLocalGraphicsEnvironment(); ! if (lge instanceof DisplayChangedListener) { ! ((DisplayChangedListener) lge).displayChanged(); ! } } }); } /**
< prev index next >