/[classpath]/classpath/javax/swing/RepaintManager.java
ViewVC logotype

Diff of /classpath/javax/swing/RepaintManager.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6.2.4 by gnu_andrew, Thu Apr 28 23:00:13 2005 UTC revision 1.6.2.5 by gnu_andrew, Fri May 20 18:20:57 2005 UTC
# Line 489  public class RepaintManager Line 489  public class RepaintManager
489    }    }
490    
491    /**    /**
492       * Creates and returns a volatile offscreen buffer for the specified
493       * component that can be used as a double buffer. The returned image
494       * is a {@link VolatileImage}. Its size will be <code>(proposedWidth,
495       * proposedHeight)</code> except when the maximum double buffer size
496       * has been set in this RepaintManager.
497       *
498       * @param comp the Component for which to create a volatile buffer
499       * @param proposedWidth the proposed width of the buffer
500       * @param proposedHeight the proposed height of the buffer
501       *
502       * @since 1.4
503       *
504       * @see {@link VolatileImage}
505       */
506      public Image getVolatileOffscreenBuffer(Component comp, int proposedWidth,
507                                              int proposedHeight)
508      {
509        int maxWidth = doubleBufferMaximumSize.width;
510        int maxHeight = doubleBufferMaximumSize.height;
511        return comp.createVolatileImage(Math.min(maxWidth, proposedWidth),
512                                        Math.min(maxHeight, proposedHeight));
513      }
514      
515    
516      /**
517     * Get the value of the {@link #doubleBufferMaximumSize} property.     * Get the value of the {@link #doubleBufferMaximumSize} property.
518     *     *
519     * @return The current value of the property     * @return The current value of the property

Legend:
Removed from v.1.6.2.4  
changed lines
  Added in v.1.6.2.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26