As of 1.6 RepaintManager handles repaint requests
for Swing's top level components
(JWindow, JFrame and JDialog).
Any calls to repaint on one of these will call into the
appropriate addDirtyRegion method.
| Modifier and Type | Class and Description |
|---|---|
| private static class | RepaintManager.
Listener installed to detect display changes. |
| private static class | |
| private static class | |
| pack-priv static class | RepaintManager.
PaintManager is used to handle all double buffered painting for Swing. |
| private class | RepaintManager.
Runnable used to process all repaint/revalidate requests. |
| Modifier and Type | Field and Description |
|---|---|
| private static final short | |
| private static final short | |
| private static final short | |
| private static final short | |
| private short | bufferStrategyType
Type of buffer strategy to use. |
| private Map | |
| private static final DisplayChangedListener | displayChangedHandler
Listener installed to detect display changes. |
| pack-priv boolean | |
| private Dimension | |
| pack-priv static final boolean | HANDLE_TOP_LEVEL_PAINT
Whether or not the RepaintManager should handle paint requests for top levels. |
| private Map | |
| private List | |
| private boolean | |
| private static boolean | nativeDoubleBuffering
Value of the system property awt.nativeDoubleBuffering. |
| private int | paintDepth
Number of |
| private boolean | painting
True if we're in the process of painting the dirty regions. |
| private RepaintManager. | paintManager
Object responsible for handling core paint functionality. |
| private Thread | paintThread
The Thread that has initiated painting. |
| private final RepaintManager. | processingRunnable
Runnable used to process all repaint/revalidate requests. |
| private List | |
| private static RepaintManager | |
| private JComponent | repaintRoot
If the PaintManager calls into repaintRoot during painting this field will be set to the root. |
| private List | |
| pack-priv RepaintManager. | |
| pack-priv Rectangle | |
| private Map | |
| private static final int | |
| private static final int | volatileBufferType
Type of VolatileImage which should be used for double-buffered painting. |
| pack-priv static boolean | |
| private Map | volatileMap
Maps from GraphicsConfiguration to VolatileImage. |
| Access | Constructor and Description |
|---|---|
| public | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| private Image | |
| public void | addDirtyRegion(JComponent
Component to repaint, null results in nothing happening. c, int X coordinate of the region to repaint x, int Y coordinate of the region to repaint y, int Width of the region to repaint w, int Height of the region to repaint h)Add a component in the list of components that should be refreshed. |
| public void | addDirtyRegion(Window
Window to repaint, null results in nothing happening. window, int X coordinate of the region to repaint x, int Y coordinate of the region to repaint y, int Width of the region to repaint w, int Height of the region to repaint h)Adds |
| private void | addDirtyRegion0(Container c, int x, int y, int w, int h)
Add a component in the list of components that should be refreshed. |
| public synchronized void | addInvalidComponent(JComponent
a component invalidComponent)Mark the component as in need of layout and queue a runnable for the event dispatching thread that will validate the components first isValidateRoot() ancestor. |
| private void | |
| private void | adjustRoots(JComponent root, List<Component> roots, int index)
Removes any components from roots that are children of root. |
| pack-priv void | |
| private void | |
| private void | |
| pack-priv void | |
| pack-priv void | copyArea(JComponent c, Graphics g, int x, int y, int w, int h, int deltaX, int deltaY, boolean
Whether or not the copyArea needs to be clipped to the
Component's bounds. clip)Does a copy area on the specified region. |
| public static RepaintManager | Returns: the RepaintManager objecta Component -- unused in the default implementation, but could
be used by an overridden version to return a different RepaintManager
depending on the Component c)Return the RepaintManager given a Component. |
| public static RepaintManager | Returns: the RepaintManager objecta JComponent -- unused c)Return the RepaintManager for the calling thread given a JComponent. |
| private void | |
| pack-priv void | doubleBufferingChanged(JRootPane rootPane)
Invoked when the doubleBuffered or useTrueDoubleBuffering properties of a JRootPane change. |
| pack-priv void | |
| private synchronized boolean | Returns: false ifc is not yet marked dirty.Extends the dirty region for the specified component to include the new region. |
| private RepaintManager | |
| public Rectangle | Returns: the regiona component aComponent)Return the current dirty region for a component. |
| public Dimension | Returns: a Dimension object representing the maximum sizeReturns the maximum double buffer size. |
| public Image | Returns: the imagethe component c, int the width of the buffer proposedWidth, int the height of the buffer proposedHeight)Return the offscreen buffer that should be used as a double buffer with
the component |
| private synchronized RepaintManager. | |
| public Image | Returns: the volatile imagethe component c, int the width of the buffer proposedWidth, int the height of the buffer proposedHeight)Return a volatile offscreen buffer that should be used as a
double buffer with the specified component |
| public boolean | Returns: true if aComponent will be completely
painted during the next paintDirtyRegions().a component aComponent)Convenience method that returns true if aComponent will be completely painted during the next paintDirtyRegions(). |
| public boolean | Returns: true if this object is double bufferedReturns true if this RepaintManager is double buffered. |
| pack-priv boolean | |
| private synchronized boolean | |
| public void | |
| public void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | notifyRepaintPerformed(JComponent
the component c, int the x coordinate of the area x, int the y coordinate of the area y, int the width of the area w, int the height of the area h)Notify the attached repaint listeners that an area of the |
| pack-priv void | paint(JComponent
Component to paint paintingComponent, JComponent Component to obtain buffer for bufferComponent, Graphics Graphics to paint to g, int X-coordinate x, int Y-coordinate y, int Width w, int Height h)Paints a region of a component |
| public void | |
| private void | |
| private void | |
| public synchronized void | removeInvalidComponent(JComponent
a component component)Remove a component from the list of invalid components. |
| private void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| private void | |
| public static void | setCurrentManager(RepaintManager
the RepaintManager object to use aRepaintManager)Set the RepaintManager. |
| public void | setDoubleBufferingEnabled(boolean
true to activate double buffering aFlag)Enables or disables double buffering in this RepaintManager. |
| public void | |
| pack-priv void | setPaintManager(RepaintManager.
The PaintManager to use. Passing in null indicates
the fallback PaintManager should be used. paintManagerSets the |
| pack-priv boolean | |
| public synchronized String | Returns: a String representation of this objectOverrides java. Returns a string that displays and identifies this object's properties. |
| private void | |
| pack-priv boolean | useVolatileDoubleBuffer()
Returns true if we should use the |
| public void |