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 TypeMethodDescriptionvoid
addDirtyRegion
(JComponent component, int x, int y, int w, int h) void
addInvalidComponent
(JComponent component) boolean
static void
void
setCompleteCheck
(boolean completeCheck) protected void
violationFound
(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:
addInvalidComponent
in classRepaintManager
-
addDirtyRegion
- Overrides:
addDirtyRegion
in classRepaintManager
-
violationFound
-
main
- Throws:
Exception
-