net.sourceforge.atunes
Class CheckThreadViolationRepaintManager

java.lang.Object
  extended by javax.swing.RepaintManager
      extended by net.sourceforge.atunes.CheckThreadViolationRepaintManager

public class CheckThreadViolationRepaintManager
extends javax.swing.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()
          Instantiates a new check thread violation repaint manager.
CheckThreadViolationRepaintManager(boolean completeCheck)
          Instantiates a new check thread violation repaint manager.
 
Method Summary
 void addDirtyRegion(javax.swing.JComponent component, int x, int y, int w, int h)
           
 void addInvalidComponent(javax.swing.JComponent component)
           
 boolean isCompleteCheck()
          Checks if is complete check.
static void main(java.lang.String[] args)
          The main method.
 void setCompleteCheck(boolean completeCheck)
          Sets the complete check.
 
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()
Instantiates a new check thread violation repaint manager.


CheckThreadViolationRepaintManager

public CheckThreadViolationRepaintManager(boolean completeCheck)
Instantiates a new check thread violation repaint manager.

Parameters:
completeCheck - the complete check
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
The main method.

Parameters:
args - the arguments
Throws:
java.lang.Exception - the exception

addDirtyRegion

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

addInvalidComponent

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

isCompleteCheck

public boolean isCompleteCheck()
Checks if is complete check.

Returns:
true, if is complete check

setCompleteCheck

public void setCompleteCheck(boolean completeCheck)
Sets the complete check.

Parameters:
completeCheck - the new complete check


Copyright © 2006-2008 The aTunes Team. All Rights Reserved.