public class CheckingRepaintManager extends RepaintManager
RepaintManager.setCurrentManager(new CheckingRepaintManager());Based on an idea by Scott Delap (http://www.clientjava.com).
RepaintManager| Constructor and Description |
|---|
CheckingRepaintManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDirtyRegion(JComponent component,
int x,
int y,
int w,
int h)
Overriden to check EDT rule.
|
void |
addInvalidComponent(JComponent component)
Overriden to check EDT rule.
|
protected void |
checkEDTRule(Component component)
Check EDT rule on access to the given component.
|
protected void |
indicate(EDTRuleViolation violation)
Indicate a violation of the EDT rule.
|
protected boolean |
isLiableToEDTRule(StackTraceElement element)
Is the given stackTraceElement liable to the EDT rule.
|
protected boolean |
violatesEDTRule(Component component)
Does acces to the given component violate the EDT rule.
|
addDirtyRegion, addDirtyRegion, currentManager, currentManager, getDirtyRegion, getDoubleBufferMaximumSize, getOffscreenBuffer, getVolatileOffscreenBuffer, isCompletelyDirty, isDoubleBufferingEnabled, markCompletelyClean, markCompletelyDirty, paintDirtyRegions, removeInvalidComponent, setCurrentManager, setDoubleBufferingEnabled, setDoubleBufferMaximumSize, toString, validateInvalidComponentspublic void addInvalidComponent(JComponent component)
addInvalidComponent in class RepaintManagerpublic void addDirtyRegion(JComponent component, int x, int y, int w, int h)
addDirtyRegion in class RepaintManagerprotected void checkEDTRule(Component component)
component - component to be repaintedprotected boolean violatesEDTRule(Component component)
component - accessed componenttrue if EDT rule is violatedprotected boolean isLiableToEDTRule(StackTraceElement element) throws Exception
element - elementtrue if the className of the given element denotes
a subclass of java.awt.ComponentException - on any problemprotected void indicate(EDTRuleViolation violation) throws EDTRuleViolation
violation - violation of EDT ruleEDTRuleViolationCopyright © 2016. All rights reserved.