public class ForwardingRepaintManager extends RepaintManager
RepaintManager that is designed to forward all calls to a contained
delegate. This class is designed for extension, such that subclasses should
override method as appropriate and allow the original repaint manager to
handle the rest of the work.
Install a forwarding repaint manager:
RepaintManager manager = RepaintManager.currentManager(this); RepaintManager frm = new ForwardingRepaintManager(manager); RepaintManager.setCurrentManager(frm);
| Constructor and Description |
|---|
ForwardingRepaintManager(RepaintManager delegate)
Creates a new forwarding manager that forwards all calls to the delegate.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDirtyRegion(JComponent c,
int x,
int y,
int w,
int h) |
void |
addInvalidComponent(JComponent invalidComponent) |
RepaintManager |
getDelegateManager()
Gets the delegate repaint manager backing this forwarding repaint
manager.
|
Rectangle |
getDirtyRegion(JComponent component) |
Dimension |
getDoubleBufferMaximumSize() |
Image |
getOffscreenBuffer(Component c,
int proposedWidth,
int proposedHeight) |
Image |
getVolatileOffscreenBuffer(Component c,
int proposedWidth,
int proposedHeight) |
boolean |
isCompletelyDirty(JComponent component) |
boolean |
isDoubleBufferingEnabled() |
void |
markCompletelyClean(JComponent component) |
void |
markCompletelyDirty(JComponent component) |
void |
paintDirtyRegions() |
void |
removeInvalidComponent(JComponent component) |
void |
setDoubleBufferingEnabled(boolean flag) |
void |
setDoubleBufferMaximumSize(Dimension d) |
String |
toString() |
void |
validateInvalidComponents() |
addDirtyRegion, addDirtyRegion, currentManager, currentManager, setCurrentManagerpublic ForwardingRepaintManager(RepaintManager delegate)
delegate - the manager backing this ForwardingRepaintManagerNullPointerException - if delegate is nullpublic void addDirtyRegion(JComponent c, int x, int y, int w, int h)
addDirtyRegion in class RepaintManagerpublic void addInvalidComponent(JComponent invalidComponent)
addInvalidComponent in class RepaintManagerpublic Rectangle getDirtyRegion(JComponent component)
getDirtyRegion in class RepaintManagerpublic Dimension getDoubleBufferMaximumSize()
getDoubleBufferMaximumSize in class RepaintManagerpublic Image getOffscreenBuffer(Component c, int proposedWidth, int proposedHeight)
getOffscreenBuffer in class RepaintManagerpublic Image getVolatileOffscreenBuffer(Component c, int proposedWidth, int proposedHeight)
getVolatileOffscreenBuffer in class RepaintManagerpublic boolean isCompletelyDirty(JComponent component)
isCompletelyDirty in class RepaintManagerpublic boolean isDoubleBufferingEnabled()
isDoubleBufferingEnabled in class RepaintManagerpublic void markCompletelyClean(JComponent component)
markCompletelyClean in class RepaintManagerpublic void markCompletelyDirty(JComponent component)
markCompletelyDirty in class RepaintManagerpublic void paintDirtyRegions()
paintDirtyRegions in class RepaintManagerpublic void removeInvalidComponent(JComponent component)
removeInvalidComponent in class RepaintManagerpublic void setDoubleBufferingEnabled(boolean flag)
setDoubleBufferingEnabled in class RepaintManagerpublic void setDoubleBufferMaximumSize(Dimension d)
setDoubleBufferMaximumSize in class RepaintManagerpublic String toString()
toString in class RepaintManagerpublic void validateInvalidComponents()
validateInvalidComponents in class RepaintManagerpublic final RepaintManager getDelegateManager()
Copyright © 2013. All Rights Reserved.