|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.miginfocom.util.gfx.RepaintRegion
public class RepaintRegion
A special Rectangle that can have an area that are null. It handles adding of (or rather disregarding) null rects and
helps with repainting. It doesn't have do any special rectangle calculations, it mostly reduces a lot of null handling.
| Constructor Summary | |
|---|---|
RepaintRegion()
|
|
RepaintRegion(java.awt.Rectangle r)
Constructor |
|
| Method Summary | |
|---|---|
void |
add(java.awt.Point p)
Adds a point so that the current repaint region includes the point. |
void |
add(java.awt.Rectangle rect)
Add a rectangle by "unioning" it with the current rectangle. |
void |
add(java.awt.Shape shape)
Adds the bounds of the shape to the repaing region |
void |
clear()
Clears the dirty region |
boolean |
contains(int x,
int y)
Returns if the repaint region contains the point |
java.awt.Rectangle |
getBounds()
Return the current bounds of this region. |
java.awt.Rectangle |
getClonedBounds()
Return the current bounds of this region as a clone, free to use |
boolean |
hasBounds()
Returns if there is any bounds. |
void |
repaint(javax.swing.JComponent comp)
Repaint the current region of this in the component, if this region is not null
in which case the method does nothing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RepaintRegion()
public RepaintRegion(java.awt.Rectangle r)
r - The initial rect, can be null. Overtaken, not cloned!| Method Detail |
|---|
public void add(java.awt.Rectangle rect)
null.
rect - The rect to add. If null nothing happens. Not changed or kept. Cloned locally.public void add(java.awt.Point p)
p - The point to add. If null nothing happens. Not changed or kept. Cloned locally.public void add(java.awt.Shape shape)
shape - The shape. Can be null in which case nothing is added.public void clear()
public boolean hasBounds()
public java.awt.Rectangle getBounds()
public java.awt.Rectangle getClonedBounds()
null.public void repaint(javax.swing.JComponent comp)
this in the component, if this region is not null
in which case the method does nothing.
comp - The component to repaint. Not null.
public boolean contains(int x,
int y)
x - Xy - Y
false if the repaint region is empty
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||