java.lang.Object | |
↳ | sun.awt.RepaintArea |
The RepaintArea
is a geometric construct created for the
purpose of holding the geometry of several coalesced paint events.
This geometry is accessed synchronously, although it is written such
that painting may still be executed asynchronously.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new
RepaintArea |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a
Rectangle to this RepaintArea . | |||||||||||
Constrains the size of the repaint area to the passed in bounds.
| |||||||||||
Invokes paint and update on target Component with optimal
rectangular clip region.
| |||||||||||
Marks the passed in region as not needing to be painted.
| |||||||||||
Returns a string representation of the object.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Calls
Component.paint(Graphics) with given Graphics. | |||||||||||
Calls
Component.update(Graphics) with given Graphics. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Constructs a new RepaintArea
Adds a Rectangle
to this RepaintArea
.
PAINT Rectangles are divided into mostly vertical and mostly horizontal.
Each group is unioned together.
UPDATE Rectangles are unioned.
r | the specified Rectangle |
---|---|
id | possible values PaintEvent.UPDATE or PaintEvent.PAINT |
Constrains the size of the repaint area to the passed in bounds.
Invokes paint and update on target Component with optimal rectangular clip region. If PAINT bounding rectangle is less than MAX_BENEFIT_RATIO times the benefit, then the vertical and horizontal unions are painted separately. Otherwise the entire bounding rectangle is painted.
target | Component to paint or update |
---|
Marks the passed in region as not needing to be painted. It's possible this will do nothing.
Returns a string representation of the object. In general, the
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
Calls Component.paint(Graphics)
with given Graphics.
Calls Component.update(Graphics)
with given Graphics.