org.jdesktop.swinghelper.debug
Class CheckThreadViolationRepaintManager

java.lang.Object
  extended by javax.swing.RepaintManager
      extended by org.jdesktop.swinghelper.debug.CheckThreadViolationRepaintManager

public class CheckThreadViolationRepaintManager
extends RepaintManager

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

Author:
Scott Delap, Alexander Potochkin

https://swinghelper.dev.java.net/


Constructor Summary
CheckThreadViolationRepaintManager()
           
CheckThreadViolationRepaintManager(boolean completeCheck)
           
 
Method Summary
 void addDirtyRegion(JComponent component, int x, int y, int w, int h)
           
 void addInvalidComponent(JComponent component)
           
(package private) static void imageUpdateTest()
           
 boolean isCompleteCheck()
           
static void main(String[] args)
           
(package private) static void repaintTest()
           
 void setCompleteCheck(boolean completeCheck)
           
(package private) static void test()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CheckThreadViolationRepaintManager

public CheckThreadViolationRepaintManager(boolean completeCheck)

CheckThreadViolationRepaintManager

public CheckThreadViolationRepaintManager()
Method Detail

isCompleteCheck

public boolean isCompleteCheck()

setCompleteCheck

public void setCompleteCheck(boolean completeCheck)

addInvalidComponent

public void addInvalidComponent(JComponent component)
Overrides:
addInvalidComponent in class RepaintManager

addDirtyRegion

public void addDirtyRegion(JComponent component,
                           int x,
                           int y,
                           int w,
                           int h)
Overrides:
addDirtyRegion in class RepaintManager

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

test

static void test()

imageUpdateTest

static void imageUpdateTest()

repaintTest

static void repaintTest()