jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java
changeset 12398 8e4c529b8184
parent 12396 79c64c6eb61e
child 12416 7f39181f3c6e
equal deleted inserted replaced
12397:190dad37ff56 12398:8e4c529b8184
   211 
   211 
   212             // todo swing: later on we will probably have one global RM
   212             // todo swing: later on we will probably have one global RM
   213             SwingUtilities3.setDelegateRepaintManager(delegate, new RepaintManager() {
   213             SwingUtilities3.setDelegateRepaintManager(delegate, new RepaintManager() {
   214                 @Override
   214                 @Override
   215                 public void addDirtyRegion(final JComponent c, final int x, final int y, final int w, final int h) {
   215                 public void addDirtyRegion(final JComponent c, final int x, final int y, final int w, final int h) {
   216                     if (SunToolkit.isDispatchThreadForAppContext(getTarget())) {
   216                     repaintPeer(SwingUtilities.convertRectangle(
   217                         synchronized (getDelegateLock()) {
   217                             c, new Rectangle(x, y, w, h), getDelegate()));
   218                             if (getDelegate().isPaintingForPrint()) {
       
   219                                 return;
       
   220                             }
       
   221                         }
       
   222                     }
       
   223                     Rectangle res = SwingUtilities.convertRectangle(
       
   224                             c, new Rectangle(x, y, w, h), getDelegate());
       
   225                     repaintPeer(res);
       
   226                 }
   218                 }
   227             });
   219             });
   228         }
   220         }
   229     }
   221     }
   230 
   222