public class PSwingCanvas.ZBasicRepaintManager
extends org.jdesktop.swingx.RepaintManagerX
Also traps revalidate calls made by the Swing components added to the ZCanvas to reshape the applicable Visual Component.
Also keeps a list of ZSwings that are painting. This disables repaint until the component has finished painting. This is to address a problem introduced by Swing's CellRendererPane which is itself a work-around. The problem is that JTable's, JTree's, and JList's cell renderers need to be validated before repaint. Since we have to repaint the entire Swing component hierarchy (in the case of a Swing component group used as a Jazz visual component). This causes an infinite loop. So we introduce the restriction that no repaints can be triggered by a call to paint.
| Constructor and Description |
|---|
ZBasicRepaintManager()
Creates a new ZBasicRepaintManager object.
|
ZBasicRepaintManager(RepaintManager delegate)
Creates a new ZBasicRepaintManager object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDirtyRegion(JComponent c,
int x,
int y,
int w,
int h)
This is the method "repaint" now calls in the Swing components.
|
void |
addInvalidComponent(JComponent invalidComponent)
This is the method "revalidate" calls in the Swing components.
|
boolean |
isPainting(JComponent c)
Returns true if repaint is currently locked for a component and false otherwise.
|
void |
lockRepaint(JComponent c)
Locks repaint for a particular (Swing) component displayed by ZCanvas.
|
void |
unlockRepaint(JComponent c)
Unlocks repaint for a particular (Swing) component displayed by ZCanvas.
|
getDelegateManager, getDirtyRegion, getDoubleBufferMaximumSize, getOffscreenBuffer, getVolatileOffscreenBuffer, isCompletelyDirty, isDoubleBufferingEnabled, markCompletelyClean, markCompletelyDirty, paintDirtyRegions, removeInvalidComponent, setDoubleBufferingEnabled, setDoubleBufferMaximumSize, toString, validateInvalidComponentsaddDirtyRegion, addDirtyRegion, currentManager, currentManager, setCurrentManagerpublic ZBasicRepaintManager()
public ZBasicRepaintManager(RepaintManager delegate)
delegate - DOCUMENT ME!public void lockRepaint(JComponent c)
c - The component for which the repaint is to be lockedpublic void unlockRepaint(JComponent c)
c - The component for which the repaint is to be unlockedpublic boolean isPainting(JComponent c)
c - The component for which the repaint status is desiredpublic void addDirtyRegion(JComponent c, int x, int y, int w, int h)
addDirtyRegion in class org.jdesktop.swingx.RepaintManagerXc - Component to be repaintedx - X coordinate of the dirty region in the componenty - Y coordinate of the dirty region in the componentw - Width of the dirty region in the componenth - Height of the dirty region in the componentpublic void addInvalidComponent(JComponent invalidComponent)
addInvalidComponent in class org.jdesktop.swingx.ForwardingRepaintManagerinvalidComponent - The Swing component that needs validationCopyright © 2012–2025 cismet GmbH. All rights reserved.