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

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1996, 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 --- 1,7 ---- /* ! * Copyright (c) 1996, 2015, 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
*** 407,422 **** public boolean isModalBlocked() { return modalBlocker != null; } @Override - @SuppressWarnings("deprecation") public void setModalBlocked(Dialog dialog, boolean blocked) { synchronized (((Component)getTarget()).getTreeLock()) // State lock should always be after awtLock { // use WWindowPeer instead of WDialogPeer because of FileDialogs and PrintDialogs ! WWindowPeer blockerPeer = (WWindowPeer)dialog.getPeer(); if (blocked) { modalBlocker = blockerPeer; // handle native dialogs separately, as they may have not // got HWND yet; modalEnable/modalDisable is called from --- 407,422 ---- public boolean isModalBlocked() { return modalBlocker != null; } @Override public void setModalBlocked(Dialog dialog, boolean blocked) { synchronized (((Component)getTarget()).getTreeLock()) // State lock should always be after awtLock { // use WWindowPeer instead of WDialogPeer because of FileDialogs and PrintDialogs ! WWindowPeer blockerPeer = AWTAccessor.getComponentAccessor() ! .getPeer(dialog); if (blocked) { modalBlocker = blockerPeer; // handle native dialogs separately, as they may have not // got HWND yet; modalEnable/modalDisable is called from
*** 607,624 **** g.setClip(shape); } super.print(g); } - @SuppressWarnings("deprecation") private void replaceSurfaceDataRecursively(Component c) { if (c instanceof Container) { for (Component child : ((Container)c).getComponents()) { replaceSurfaceDataRecursively(child); } } ! ComponentPeer cp = c.getPeer(); if (cp instanceof WComponentPeer) { ((WComponentPeer)cp).replaceSurfaceDataLater(); } } --- 607,623 ---- g.setClip(shape); } super.print(g); } private void replaceSurfaceDataRecursively(Component c) { if (c instanceof Container) { for (Component child : ((Container)c).getComponents()) { replaceSurfaceDataRecursively(child); } } ! final Object cp = AWTAccessor.getComponentAccessor().getPeer(c); if (cp instanceof WComponentPeer) { ((WComponentPeer)cp).replaceSurfaceDataLater(); } }
*** 816,836 **** /* * Static inner class, listens for 'activeWindow' KFM property changes and * updates the list of active windows per AppContext, so the latest active * window is always at the end of the list. The list is stored in AppContext. */ ! @SuppressWarnings( value = {"deprecation", "unchecked"}) private static class ActiveWindowListener implements PropertyChangeListener { @Override public void propertyChange(PropertyChangeEvent e) { Window w = (Window)e.getNewValue(); if (w == null) { return; } AppContext appContext = SunToolkit.targetToAppContext(w); synchronized (appContext) { ! WWindowPeer wp = (WWindowPeer)w.getPeer(); // add/move wp to the end of the list List<WWindowPeer> l = (List<WWindowPeer>)appContext.get(ACTIVE_WINDOWS_KEY); if (l != null) { l.remove(wp); l.add(wp); --- 815,835 ---- /* * Static inner class, listens for 'activeWindow' KFM property changes and * updates the list of active windows per AppContext, so the latest active * window is always at the end of the list. The list is stored in AppContext. */ ! @SuppressWarnings("unchecked") private static class ActiveWindowListener implements PropertyChangeListener { @Override public void propertyChange(PropertyChangeEvent e) { Window w = (Window)e.getNewValue(); if (w == null) { return; } AppContext appContext = SunToolkit.targetToAppContext(w); synchronized (appContext) { ! WWindowPeer wp = AWTAccessor.getComponentAccessor().getPeer(w); // add/move wp to the end of the list List<WWindowPeer> l = (List<WWindowPeer>)appContext.get(ACTIVE_WINDOWS_KEY); if (l != null) { l.remove(wp); l.add(wp);