![]() |
|
Contents |
Public Member Functions | |
| RepaintManager () | |
| void | addInvalidComponent (final JComponent invalidComponent) |
| Method doesn't perform component invalidation. | |
| void | removeInvalidComponent (final JComponent component) |
| void | validateInvalidComponents () |
| void | addDirtyRegion (final JComponent c, final int x, final int y, final int w, final int h) |
| Rectangle | getDirtyRegion (final JComponent c) |
| void | markCompletelyDirty (final JComponent c) |
| void | markCompletelyClean (final JComponent c) |
| boolean | isCompletelyDirty (final JComponent c) |
| void | paintDirtyRegions () |
| Image | getOffscreenBuffer (final Component c, final int proposedWidth, final int proposedHeight) |
| Image | getVolatileOffscreenBuffer (final Component c, final int proposedWidth, final int proposedHeight) |
| void | setDoubleBufferMaximumSize (final Dimension d) |
| Dimension | getDoubleBufferMaximumSize () |
| void | setDoubleBufferingEnabled (final boolean isEnabled) |
| boolean | isDoubleBufferingEnabled () |
Static Public Member Functions | |
| static RepaintManager | currentManager (final Component c) |
| static RepaintManager | currentManager (final JComponent c) |
| static void | setCurrentManager (final RepaintManager repaintManager) |
Private Member Functions | |
| void | scheduleProcessingEvent () |
| Component | getValidationRoot (final Component c) |
| Map | prepareOptimizedDirtyRegions () |
| boolean | mergeWithParent (final Component comp, final MultiRectArea compDirtyRegion) |
| boolean | mergeWithChildren (final Component comp, final MultiRectArea compDirtyRegion) |
Static Private Member Functions | |
| static void | fillImage (final Image image, final Color c, final int width, final int height) |
Private Attributes | |
| Set | invalidRoots = Collections.synchronizedSet(new HashSet()) |
| Image | offscreenImage |
| VolatileImage | volatileOffscreenImage |
| Dimension | maximumSize |
| boolean | doubleBufferingEnabled = true |
| Map | dirtyRegions = new Hashtable() |
| Map | optimizedDirtyRegions = new HashMap() |
| int | numberOfScheduledPaintEvents |
| final Runnable | paintEvent |
Static Private Attributes | |
| static final Rectangle | COMPLETELY_DIRTY_RECT = new Rectangle(0, 0, Integer.MAX_VALUE, Integer.MAX_VALUE) |
| static RepaintManager | instance |
| RepaintManager | ( | ) |
| static RepaintManager currentManager | ( | final Component | c | ) | [static] |
| static RepaintManager currentManager | ( | final JComponent | c | ) | [static] |
| static void setCurrentManager | ( | final RepaintManager | repaintManager | ) | [static] |
| void addInvalidComponent | ( | final JComponent | invalidComponent | ) |
Method doesn't perform component invalidation.
It just adds component validation root to the list of roots waiting for validation and schedules it.
| void removeInvalidComponent | ( | final JComponent | component | ) |
| void validateInvalidComponents | ( | ) |
| void addDirtyRegion | ( | final JComponent | c, | |
| final int | x, | |||
| final int | y, | |||
| final int | w, | |||
| final int | h | |||
| ) |
| Rectangle getDirtyRegion | ( | final JComponent | c | ) |
| void markCompletelyDirty | ( | final JComponent | c | ) |
| void markCompletelyClean | ( | final JComponent | c | ) |
| boolean isCompletelyDirty | ( | final JComponent | c | ) |
| void paintDirtyRegions | ( | ) |
| Image getVolatileOffscreenBuffer | ( | final Component | c, | |
| final int | proposedWidth, | |||
| final int | proposedHeight | |||
| ) |
| void setDoubleBufferMaximumSize | ( | final Dimension | d | ) |
| Dimension getDoubleBufferMaximumSize | ( | ) |
| void setDoubleBufferingEnabled | ( | final boolean | isEnabled | ) |
| boolean isDoubleBufferingEnabled | ( | ) |
| void scheduleProcessingEvent | ( | ) | [private] |
| Map prepareOptimizedDirtyRegions | ( | ) | [private] |
| boolean mergeWithParent | ( | final Component | comp, | |
| final MultiRectArea | compDirtyRegion | |||
| ) | [private] |
| boolean mergeWithChildren | ( | final Component | comp, | |
| final MultiRectArea | compDirtyRegion | |||
| ) | [private] |
| static void fillImage | ( | final Image | image, | |
| final Color | c, | |||
| final int | width, | |||
| final int | height | |||
| ) | [static, private] |
Set invalidRoots = Collections.synchronizedSet(new HashSet()) [private] |
Image offscreenImage [private] |
VolatileImage volatileOffscreenImage [private] |
Dimension maximumSize [private] |
boolean doubleBufferingEnabled = true [private] |
Map dirtyRegions = new Hashtable() [private] |
Map optimizedDirtyRegions = new HashMap() [private] |
int numberOfScheduledPaintEvents [private] |
final Rectangle COMPLETELY_DIRTY_RECT = new Rectangle(0, 0, Integer.MAX_VALUE, Integer.MAX_VALUE) [static, private] |
RepaintManager instance [static, private] |
final Runnable paintEvent [private] |
Initial value:
new Runnable() { public void run() { boolean shouldPaint = false; synchronized(RepaintManager.this) { numberOfScheduledPaintEvents--; shouldPaint = numberOfScheduledPaintEvents == 0; } if (shouldPaint) { validateInvalidComponents(); paintDirtyRegions(); } } }