src/java.desktop/unix/classes/sun/awt/X11/XRepaintArea.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2003, 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) 2003, 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 ---- package sun.awt.X11; import java.awt.Component; import java.awt.Graphics; + import sun.awt.AWTAccessor; import sun.awt.RepaintArea; /** * The <code>RepaintArea</code> is a geometric construct created for the * purpose of holding the geometry of several coalesced paint events.
*** 53,66 **** } /** * Calls <code>Component.paint(Graphics)</code> with given Graphics. */ - @SuppressWarnings("deprecation") protected void paintComponent(Component comp, Graphics g) { if (comp != null) { ! final XComponentPeer peer = (XComponentPeer) comp.getPeer(); if (peer != null) { peer.paintPeer(g); } super.paintComponent(comp, g); } --- 54,67 ---- } /** * Calls <code>Component.paint(Graphics)</code> with given Graphics. */ protected void paintComponent(Component comp, Graphics g) { if (comp != null) { ! final XComponentPeer peer = AWTAccessor.getComponentAccessor() ! .getPeer(comp); if (peer != null) { peer.paintPeer(g); } super.paintComponent(comp, g); }