Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Class java.awt.swing.RepaintManager

java.lang.Object
    |
    +----java.awt.swing.RepaintManager

public class RepaintManager
extends Object

Constructor Summary
 RepaintManager()
Create a new RepaintManager instance.
 

Method Summary
void  addDirtyRegion(JComponent aComponent, int x, int y, int w, int h)
Add a component in the list of component that should be refreshed.
void  addInvalidComponent(JComponent component)
 
static RepaintManager  currentManager(JComponent comp)
Return the RepaintManager for the calling thread.
Rectangle  getDirtyRegion(JComponent aComponent)
Return the current dirty region for a component.
Dimension  getDoubleBufferMaximumSize()
 
Image  getOffscreenBuffer(Component c, int proposedWidth, int proposedHeight)
Return the offscreen buffer that should be used as a double buffer with the component c By default there is a double buffer per RepaintManager.
boolean  isCompletelyDirty(JComponent aComponent)
Convenience that returns true if aComponent will be completely painted during the next paintDirtyRegions().
boolean  isDoubleBufferingEnabled()
 
void  markCompletelyClean(JComponent aComponent)
Mark a component completely clean.
void  markCompletelyDirty(JComponent aComponent)
Mark a component completely dirty.
void  paintDirtyRegions()
Cause all the known dirty regions to be painted
void  removeInvalidComponent(JComponent component)
Remove an invalid component
void  repaintDirtyRegions()
 
static void  setCurrentManager(RepaintManager aRepaintManager)
Set the RepaintManager that should be used for the calling thread.
void  setDoubleBufferingEnabled(boolean aFlag)
 
void  setDoubleBufferMaximumSize(Dimension d)
Set the maximum double buffer size.
String  toString()
 
void  validateInvalidComponents()
Cause all invalide component to get validated
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepaintManager

public RepaintManager()
Create a new RepaintManager instance. You rarely call this constructor. directly. To get the default RepaintManager, use RepaintManager.currentManager(JComponent) (normally "this").
Method Detail

currentManager

public static RepaintManager currentManager(JComponent comp)
Return the RepaintManager for the calling thread. This method will maintain one RepaintManager per thread group.

setCurrentManager

public static void setCurrentManager(RepaintManager aRepaintManager)
Set the RepaintManager that should be used for the calling thread. aRepaintManager will become the current RepaintManager for the calling thread's thread group.

addInvalidComponent

public void addInvalidComponent(JComponent component)

removeInvalidComponent

public void removeInvalidComponent(JComponent component)
Remove an invalid component

addDirtyRegion

public void addDirtyRegion(JComponent aComponent,
                           int x,
                           int y,
                           int w,
                           int h)
Add a component in the list of component that should be refreshed. If aComponent already has some dirty region, the rectangle (x,y,w,h) will be added to the region that should be redrawn.

getDirtyRegion

public Rectangle getDirtyRegion(JComponent aComponent)
Return the current dirty region for a component. Return an empty rectangle if the component is not dirty.

markCompletelyDirty

public void markCompletelyDirty(JComponent aComponent)
Mark a component completely dirty. aComponent will be completely painted during the next paintDirtyRegions() call.

markCompletelyClean

public void markCompletelyClean(JComponent aComponent)
Mark a component completely clean. aComponent will not get painted during the next paintDirtyRegions() call

isCompletelyDirty

public boolean isCompletelyDirty(JComponent aComponent)
Convenience that returns true if aComponent will be completely painted during the next paintDirtyRegions(). If computing dirty regions is expensive for your component, use this method and avoid computing dirty region if it return true.

repaintDirtyRegions

public void repaintDirtyRegions()

validateInvalidComponents

public void validateInvalidComponents()
Cause all invalide component to get validated

paintDirtyRegions

public void paintDirtyRegions()
Cause all the known dirty regions to be painted

toString

public String toString()
Overrides:
toString in class Object

getOffscreenBuffer

public Image getOffscreenBuffer(Component c,
                                int proposedWidth,
                                int proposedHeight)
Return the offscreen buffer that should be used as a double buffer with the component c By default there is a double buffer per RepaintManager. The buffer might be smaller than (proposedWidth,proposedHeight) This happens when the maximum double buffer size as been set for the receiving repaint manager.

setDoubleBufferMaximumSize

public void setDoubleBufferMaximumSize(Dimension d)
Set the maximum double buffer size.

getDoubleBufferMaximumSize

public Dimension getDoubleBufferMaximumSize()

setDoubleBufferingEnabled

public void setDoubleBufferingEnabled(boolean aFlag)

isDoubleBufferingEnabled

public boolean isDoubleBufferingEnabled()

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.