Package com.bc.ceres.swing.debug
Class CheckThreadViolationRepaintManager
java.lang.Object
javax.swing.RepaintManager
com.bc.ceres.swing.debug.CheckThreadViolationRepaintManager
This class is used to detect Event Dispatch Thread rule violations
See How to Use Threads
for more info
This is a modification of original idea of Scott Delap
Initial version of ThreadCheckingRepaintManager can be found here
Easily Find Swing Threading Mistakes
Also see Debugging Swing, the final summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDirtyRegion(JComponent component, int x, int y, int w, int h) voidaddInvalidComponent(JComponent component) booleanstatic voidvoidsetCompleteCheck(boolean completeCheck) protected voidviolationFound(JComponent c, StackTraceElement[] stackTrace) Methods inherited from class javax.swing.RepaintManager
addDirtyRegion, addDirtyRegion, currentManager, currentManager, getDirtyRegion, getDoubleBufferMaximumSize, getOffscreenBuffer, getVolatileOffscreenBuffer, isCompletelyDirty, isDoubleBufferingEnabled, markCompletelyClean, markCompletelyDirty, paintDirtyRegions, removeInvalidComponent, setCurrentManager, setDoubleBufferingEnabled, setDoubleBufferMaximumSize, toString, validateInvalidComponents
-
Constructor Details
-
CheckThreadViolationRepaintManager
public CheckThreadViolationRepaintManager(boolean completeCheck) -
CheckThreadViolationRepaintManager
public CheckThreadViolationRepaintManager()
-
-
Method Details
-
isCompleteCheck
public boolean isCompleteCheck() -
setCompleteCheck
public void setCompleteCheck(boolean completeCheck) -
addInvalidComponent
- Overrides:
addInvalidComponentin classRepaintManager
-
addDirtyRegion
- Overrides:
addDirtyRegionin classRepaintManager
-
violationFound
-
main
- Throws:
Exception
-