< prev index next >

src/java.desktop/share/classes/javax/swing/RepaintManager.java

Print this page




 504      * @see JFrame#repaint
 505      * @see JWindow#repaint
 506      * @see JDialog#repaint
 507      * @since 1.6
 508      */
 509     public void addDirtyRegion(Window window, int x, int y, int w, int h) {
 510         addDirtyRegion0(window, x, y, w, h);
 511     }
 512 
 513     /**
 514      * Adds <code>applet</code> to the list of <code>Component</code>s that
 515      * need to be repainted.
 516      *
 517      * @param applet Applet to repaint, null results in nothing happening.
 518      * @param x X coordinate of the region to repaint
 519      * @param y Y coordinate of the region to repaint
 520      * @param w Width of the region to repaint
 521      * @param h Height of the region to repaint
 522      * @see JApplet#repaint
 523      * @since 1.6




 524      */
 525     @SuppressWarnings("deprecation")
 526     public void addDirtyRegion(Applet applet, int x, int y, int w, int h) {
 527         addDirtyRegion0(applet, x, y, w, h);
 528     }
 529 
 530     @SuppressWarnings("deprecation")
 531     void scheduleHeavyWeightPaints() {
 532         Map<Container,Rectangle> hws;
 533 
 534         synchronized(this) {
 535             if (hwDirtyComponents.size() == 0) {
 536                 return;
 537             }
 538             hws = hwDirtyComponents;
 539             hwDirtyComponents =  new IdentityHashMap<Container,Rectangle>();
 540         }
 541         for (Container hw : hws.keySet()) {
 542             Rectangle dirty = hws.get(hw);
 543             if (hw instanceof Window) {
 544                 addDirtyRegion((Window)hw, dirty.x, dirty.y,
 545                                dirty.width, dirty.height);




 504      * @see JFrame#repaint
 505      * @see JWindow#repaint
 506      * @see JDialog#repaint
 507      * @since 1.6
 508      */
 509     public void addDirtyRegion(Window window, int x, int y, int w, int h) {
 510         addDirtyRegion0(window, x, y, w, h);
 511     }
 512 
 513     /**
 514      * Adds <code>applet</code> to the list of <code>Component</code>s that
 515      * need to be repainted.
 516      *
 517      * @param applet Applet to repaint, null results in nothing happening.
 518      * @param x X coordinate of the region to repaint
 519      * @param y Y coordinate of the region to repaint
 520      * @param w Width of the region to repaint
 521      * @param h Height of the region to repaint
 522      * @see JApplet#repaint
 523      * @since 1.6
 524      *
 525      * @deprecated The Applet API is deprecated. See the
 526      * <a href="../../java/applet/package-summary.html"> java.applet package
 527      * documentation</a> for further information.
 528      */
 529     @Deprecated(since = "9")
 530     public void addDirtyRegion(Applet applet, int x, int y, int w, int h) {
 531         addDirtyRegion0(applet, x, y, w, h);
 532     }
 533 
 534     @SuppressWarnings("deprecation")
 535     void scheduleHeavyWeightPaints() {
 536         Map<Container,Rectangle> hws;
 537 
 538         synchronized(this) {
 539             if (hwDirtyComponents.size() == 0) {
 540                 return;
 541             }
 542             hws = hwDirtyComponents;
 543             hwDirtyComponents =  new IdentityHashMap<Container,Rectangle>();
 544         }
 545         for (Container hw : hws.keySet()) {
 546             Rectangle dirty = hws.get(hw);
 547             if (hw instanceof Window) {
 548                 addDirtyRegion((Window)hw, dirty.x, dirty.y,
 549                                dirty.width, dirty.height);


< prev index next >