|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.RepaintManager
com.threerings.media.ActiveRepaintManager
public class ActiveRepaintManager
Used to get Swing's repainting to jive with our active rendering strategy.
FrameManager| Field Summary | |
|---|---|
protected Rectangle |
_cbounds
Used to compute dirty components' bounds. |
protected boolean[] |
_clipped
Used when rendering "layered" components. |
protected Map<JComponent,Rectangle> |
_dirty
A mapping of invalid rectangles for each widget that is dirty. |
protected Object[] |
_invalid
A list of invalid components. |
protected Component |
_root
The root of our interface. |
protected Map<JComponent,Rectangle> |
_spare
A spare hashmap that we swap in while repainting dirty components in the old hashmap. |
protected static boolean |
DEBUG
We debug so much that we have to make it easy to enable and disable debug logging. |
| Constructor Summary | |
|---|---|
ActiveRepaintManager(Component root)
Components that are rooted in this component (which must be a Window or an Applet) will be rendered into the offscreen buffer managed by the frame manager. |
|
| Method Summary | |
|---|---|
void |
addDirtyRegion(JComponent comp,
int x,
int y,
int width,
int height)
|
void |
addInvalidComponent(JComponent comp)
|
protected static void |
dumpHierarchy(Component comp)
Dumps the containment hierarchy for the supplied component. |
Rectangle |
getDirtyRegion(JComponent comp)
|
protected Component |
getRoot(Component comp)
Returns the root component for the supplied component or null if it is not part of a rooted hierarchy or if any parent along the way is found to be hidden or without a peer. |
void |
markCompletelyClean(JComponent comp)
|
boolean |
paintComponents(Graphics g,
FrameManager fmgr)
Paints the components that have become dirty since the last tick. |
protected static String |
toString(Component comp)
Used to dump a component when debugging. |
void |
validateComponents()
Validates the invalid components that have been queued up since the last frame tick. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Component _root
protected Object[] _invalid
protected Map<JComponent,Rectangle> _dirty
protected Map<JComponent,Rectangle> _spare
protected Rectangle _cbounds
protected boolean[] _clipped
protected static final boolean DEBUG
| Constructor Detail |
|---|
public ActiveRepaintManager(Component root)
Window or an Applet) will be rendered into the offscreen buffer managed by the frame manager. Other
components will be rendered into separate offscreen buffers and repainted in the normal
Swing manner.
| Method Detail |
|---|
public void addInvalidComponent(JComponent comp)
addInvalidComponent in class RepaintManager
public void addDirtyRegion(JComponent comp,
int x,
int y,
int width,
int height)
addDirtyRegion in class RepaintManagerprotected Component getRoot(Component comp)
public Rectangle getDirtyRegion(JComponent comp)
getDirtyRegion in class RepaintManagerpublic void markCompletelyClean(JComponent comp)
markCompletelyClean in class RepaintManagerpublic void validateComponents()
public boolean paintComponents(Graphics g,
FrameManager fmgr)
protected static String toString(Component comp)
protected static void dumpHierarchy(Component comp)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||