jdk/src/share/classes/javax/swing/JComponent.java
changeset 6647 9d119d6c36b9
parent 5506 202f599c92aa
child 7005 5e6d24f4303b
equal deleted inserted replaced
6513:83264865df37 6647:9d119d6c36b9
  4785      * @param height  the height of the dirty region
  4785      * @param height  the height of the dirty region
  4786      * @see java.awt.Component#isShowing
  4786      * @see java.awt.Component#isShowing
  4787      * @see RepaintManager#addDirtyRegion
  4787      * @see RepaintManager#addDirtyRegion
  4788      */
  4788      */
  4789     public void repaint(long tm, int x, int y, int width, int height) {
  4789     public void repaint(long tm, int x, int y, int width, int height) {
       
  4790         Container p = this;
       
  4791         while ((p = p.getParent()) instanceof JComponent) {
       
  4792             JComponent jp = (JComponent) p;
       
  4793             if (jp.isPaintingOrigin()) {
       
  4794                 Rectangle rectangle = SwingUtilities.convertRectangle(
       
  4795                         this, new Rectangle(x, y, width, height), jp);
       
  4796                 jp.repaint(tm,
       
  4797                         rectangle.x, rectangle.y, rectangle.width, rectangle.height);
       
  4798                 return;
       
  4799             }
       
  4800         }
  4790         RepaintManager.currentManager(this).addDirtyRegion(this, x, y, width, height);
  4801         RepaintManager.currentManager(this).addDirtyRegion(this, x, y, width, height);
  4791     }
  4802     }
  4792 
  4803 
  4793 
  4804 
  4794     /**
  4805     /**