src/java.desktop/windows/classes/sun/awt/windows/WScrollPanePeer.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
*** 27,36 **** --- 27,37 ---- import java.awt.*; import java.awt.event.AdjustmentEvent; import java.awt.peer.ScrollPanePeer; import sun.awt.AWTAccessor; + import sun.awt.AWTAccessor.ComponentAccessor; import sun.awt.PeerEvent; import sun.util.logging.PlatformLogger; final class WScrollPanePeer extends WPanelPeer implements ScrollPanePeer {
*** 197,207 **** this.pos = pos; this.isAdjusting = isAdjusting; } @Override - @SuppressWarnings("deprecation") public void run() { if (getScrollChild() == null) { return; } ScrollPane sp = (ScrollPane)WScrollPanePeer.this.target; --- 198,207 ----
*** 265,286 **** type); // Paint the exposed area right away. To do this - find // the heavyweight ancestor of the scroll child. Component hwAncestor = getScrollChild(); while (hwAncestor != null ! && !(hwAncestor.getPeer() instanceof WComponentPeer)) { hwAncestor = hwAncestor.getParent(); } if (log.isLoggable(PlatformLogger.Level.FINE)) { if (hwAncestor == null) { log.fine("Assertion (hwAncestor != null) failed, " + "couldn't find heavyweight ancestor of scroll pane child"); } } ! WComponentPeer hwPeer = (WComponentPeer)hwAncestor.getPeer(); hwPeer.paintDamagedAreaImmediately(); } } } --- 265,287 ---- type); // Paint the exposed area right away. To do this - find // the heavyweight ancestor of the scroll child. Component hwAncestor = getScrollChild(); + final ComponentAccessor acc = AWTAccessor.getComponentAccessor(); while (hwAncestor != null ! && !(acc.getPeer(hwAncestor) instanceof WComponentPeer)) { hwAncestor = hwAncestor.getParent(); } if (log.isLoggable(PlatformLogger.Level.FINE)) { if (hwAncestor == null) { log.fine("Assertion (hwAncestor != null) failed, " + "couldn't find heavyweight ancestor of scroll pane child"); } } ! WComponentPeer hwPeer = acc.getPeer(hwAncestor); hwPeer.paintDamagedAreaImmediately(); } } }