Package rma.util.debug
Class LogViolationRepaintManager
java.lang.Object
javax.swing.RepaintManager
rma.util.debug.CheckThreadViolationRepaintManager
rma.util.debug.LogViolationRepaintManager
Logs a message when a Event Dispatch Thread rule violation is detected. Adapted from org.assertj.swing.edt.FailOnThreadViolationRepaintManager. See How to Use Threads for more information.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LogViolationRepaintManager
install()
Creates a newLogViolationRepaintManager
and sets it as the current repaint manager.static Boolean
Calls LogViolationRepaintManager.install() if LogViolationRepaintManager.PROP is true.static RepaintManager
Tries to restore the repaint manager before installing theLogViolationRepaintManager
viainstall()
.Methods inherited from class rma.util.debug.CheckThreadViolationRepaintManager
addDirtyRegion, addInvalidComponent, checkNotNull
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
-
Field Details
-
PROP
- See Also:
-
-
Constructor Details
-
LogViolationRepaintManager
public LogViolationRepaintManager() -
LogViolationRepaintManager
public LogViolationRepaintManager(boolean completeCheck)
-
-
Method Details
-
install
Creates a new
LogViolationRepaintManager
and sets it as the current repaint manager.On Sun JVMs, this method will install the new repaint manager the first time only. Once installed, subsequent calls to this method will not install new repaint managers. This optimization may not work on non-Sun JVMs, since we use reflection to check if a
CheckThreadViolationRepaintManager
is already installed.- Returns:
- the created (and installed) repaint manager.
- See Also:
-
possiblyInstall
Calls LogViolationRepaintManager.install() if LogViolationRepaintManager.PROP is true.- Returns:
- true if the install method was called.
-
uninstall
Tries to restore the repaint manager before installing the
LogViolationRepaintManager
viainstall()
.- Returns:
- the restored (and installed) repaint manager.
- See Also:
-