< prev index next >

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

Print this page




  38  * that painting may still be executed asynchronously.
  39  *
  40  * @author      Eric Hawkes
  41  */
  42 final class XRepaintArea extends RepaintArea {
  43 
  44     /**
  45      * Calls <code>Component.update(Graphics)</code> with given Graphics.
  46      */
  47     protected void updateComponent(Component comp, Graphics g) {
  48         if (comp != null) {
  49             // We don't call peer.paintPeer() here, because we shouldn't paint
  50             // native component when processing UPDATE events.
  51             super.updateComponent(comp, g);
  52         }
  53     }
  54 
  55     /**
  56      * Calls <code>Component.paint(Graphics)</code> with given Graphics.
  57      */

  58     protected void paintComponent(Component comp, Graphics g) {
  59         if (comp != null) {
  60             final XComponentPeer peer = (XComponentPeer) comp.getPeer();
  61             if (peer != null) {
  62                 peer.paintPeer(g);
  63             }
  64             super.paintComponent(comp, g);
  65         }
  66     }
  67 }


  38  * that painting may still be executed asynchronously.
  39  *
  40  * @author      Eric Hawkes
  41  */
  42 final class XRepaintArea extends RepaintArea {
  43 
  44     /**
  45      * Calls <code>Component.update(Graphics)</code> with given Graphics.
  46      */
  47     protected void updateComponent(Component comp, Graphics g) {
  48         if (comp != null) {
  49             // We don't call peer.paintPeer() here, because we shouldn't paint
  50             // native component when processing UPDATE events.
  51             super.updateComponent(comp, g);
  52         }
  53     }
  54 
  55     /**
  56      * Calls <code>Component.paint(Graphics)</code> with given Graphics.
  57      */
  58     @SuppressWarnings("deprecation")
  59     protected void paintComponent(Component comp, Graphics g) {
  60         if (comp != null) {
  61             final XComponentPeer peer = (XComponentPeer) comp.getPeer();
  62             if (peer != null) {
  63                 peer.paintPeer(g);
  64             }
  65             super.paintComponent(comp, g);
  66         }
  67     }
  68 }
< prev index next >