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 |