public class ForwardingRepaintManager
extends javax.swing.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(javax.swing.RepaintManager delegate)
Creates a new forwarding manager that forwards all calls to the delegate.
|
Modifier and Type | Method and Description |
---|---|
void |
addDirtyRegion(java.applet.Applet applet,
int x,
int y,
int w,
int h) |
void |
addDirtyRegion(javax.swing.JComponent c,
int x,
int y,
int w,
int h) |
void |
addDirtyRegion(java.awt.Window window,
int x,
int y,
int w,
int h) |
void |
addInvalidComponent(javax.swing.JComponent invalidComponent) |
javax.swing.RepaintManager |
getDelegateManager()
Gets the delegate repaint manager backing this forwarding repaint
manager.
|
java.awt.Rectangle |
getDirtyRegion(javax.swing.JComponent component) |
java.awt.Dimension |
getDoubleBufferMaximumSize() |
java.awt.Image |
getOffscreenBuffer(java.awt.Component c,
int proposedWidth,
int proposedHeight) |
java.awt.Image |
getVolatileOffscreenBuffer(java.awt.Component c,
int proposedWidth,
int proposedHeight) |
boolean |
isCompletelyDirty(javax.swing.JComponent component) |
boolean |
isDoubleBufferingEnabled() |
void |
markCompletelyClean(javax.swing.JComponent component) |
void |
markCompletelyDirty(javax.swing.JComponent component) |
void |
paintDirtyRegions() |
void |
removeInvalidComponent(javax.swing.JComponent component) |
void |
setDoubleBufferingEnabled(boolean flag) |
void |
setDoubleBufferMaximumSize(java.awt.Dimension d) |
java.lang.String |
toString() |
void |
validateInvalidComponents() |
public ForwardingRepaintManager(javax.swing.RepaintManager delegate)
delegate
- the manager backing this ForwardingRepaintManager
java.lang.NullPointerException
- if delegate
is null
public void addDirtyRegion(java.applet.Applet applet, int x, int y, int w, int h)
addDirtyRegion
in class javax.swing.RepaintManager
public void addDirtyRegion(javax.swing.JComponent c, int x, int y, int w, int h)
addDirtyRegion
in class javax.swing.RepaintManager
public void addDirtyRegion(java.awt.Window window, int x, int y, int w, int h)
addDirtyRegion
in class javax.swing.RepaintManager
public void addInvalidComponent(javax.swing.JComponent invalidComponent)
addInvalidComponent
in class javax.swing.RepaintManager
public java.awt.Rectangle getDirtyRegion(javax.swing.JComponent component)
getDirtyRegion
in class javax.swing.RepaintManager
public java.awt.Dimension getDoubleBufferMaximumSize()
getDoubleBufferMaximumSize
in class javax.swing.RepaintManager
public java.awt.Image getOffscreenBuffer(java.awt.Component c, int proposedWidth, int proposedHeight)
getOffscreenBuffer
in class javax.swing.RepaintManager
public java.awt.Image getVolatileOffscreenBuffer(java.awt.Component c, int proposedWidth, int proposedHeight)
getVolatileOffscreenBuffer
in class javax.swing.RepaintManager
public boolean isCompletelyDirty(javax.swing.JComponent component)
isCompletelyDirty
in class javax.swing.RepaintManager
public boolean isDoubleBufferingEnabled()
isDoubleBufferingEnabled
in class javax.swing.RepaintManager
public void markCompletelyClean(javax.swing.JComponent component)
markCompletelyClean
in class javax.swing.RepaintManager
public void markCompletelyDirty(javax.swing.JComponent component)
markCompletelyDirty
in class javax.swing.RepaintManager
public void paintDirtyRegions()
paintDirtyRegions
in class javax.swing.RepaintManager
public void removeInvalidComponent(javax.swing.JComponent component)
removeInvalidComponent
in class javax.swing.RepaintManager
public void setDoubleBufferingEnabled(boolean flag)
setDoubleBufferingEnabled
in class javax.swing.RepaintManager
public void setDoubleBufferMaximumSize(java.awt.Dimension d)
setDoubleBufferMaximumSize
in class javax.swing.RepaintManager
public java.lang.String toString()
toString
in class javax.swing.RepaintManager
public void validateInvalidComponents()
validateInvalidComponents
in class javax.swing.RepaintManager
public final javax.swing.RepaintManager getDelegateManager()