|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.media.MediaOverlay
public class MediaOverlay
Provides an overlaid media "canvas" that allows for the rendering of sprites and animations on
top of everything else that takes place the view managed by a FrameManager. The media
overlay coordinates through the ActiveRepaintManager to repaint areas of the screen that
it has left dirty.
| Field Summary | |
|---|---|
protected Rectangle[] |
_dirty
A temporary list of dirty rectangles maintained during the painting process. |
protected FrameManager |
_framemgr
The frame manager with whom we cooperate. |
protected MetaMediaManager |
_metamgr
Handles the heavy lifting involving media. |
| Constructor Summary | |
|---|---|
protected |
MediaOverlay(FrameManager fmgr)
Creates a media overlay. |
| Method Summary | |
|---|---|
void |
abortAnimation(Animation anim)
Aborts a currently running animation and removes it from this overlay. |
void |
addAnimation(Animation anim)
Adds an animation to this overlay. |
void |
addDirtyRegion(Rectangle rect)
Adds a dirty region to this overlay. |
void |
addSprite(Sprite sprite)
Adds a sprite to this overlay. |
void |
clearAnimations()
Removes all animations from this overlay. |
void |
clearSprites()
Removes all sprites from this overlay. |
Graphics2D |
createGraphics()
Creates a graphics context for the component underlying this media host. |
AnimationManager |
getAnimationManager()
Returns a reference to the animation manager used by this media panel. |
SpriteManager |
getSpriteManager()
Returns a reference to the sprite manager used by this media overlay. |
boolean |
isManaged(Animation anim)
|
boolean |
isManaged(Sprite sprite)
|
boolean |
paint(Graphics2D gfx)
Called by the FrameManager after everything is done painting, allowing us to paint
gloriously overtop of everything in the frame. |
void |
propagateDirtyRegions(ActiveRepaintManager repmgr,
JRootPane root)
Called by the FrameManager to propagate our dirty regions to the active repaint
manager so that it can repaint the underlying components just prior to our painting our
media. |
void |
removeSprite(Sprite sprite)
Removes a sprite from this overlay. |
void |
tick(long tickStamp)
Called by the frame manager on every tick. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected FrameManager _framemgr
protected MetaMediaManager _metamgr
protected Rectangle[] _dirty
| Constructor Detail |
|---|
protected MediaOverlay(FrameManager fmgr)
FrameManager will construct an instance.
| Method Detail |
|---|
public AnimationManager getAnimationManager()
public SpriteManager getSpriteManager()
public void addSprite(Sprite sprite)
public boolean isManaged(Sprite sprite)
public void removeSprite(Sprite sprite)
public void clearSprites()
public void addAnimation(Animation anim)
public boolean isManaged(Animation anim)
public void abortAnimation(Animation anim)
public void clearAnimations()
public void addDirtyRegion(Rectangle rect)
public void propagateDirtyRegions(ActiveRepaintManager repmgr,
JRootPane root)
FrameManager to propagate our dirty regions to the active repaint
manager so that it can repaint the underlying components just prior to our painting our
media. This will be followed by a call to paint(java.awt.Graphics2D) after the components have been
repainted.
public boolean paint(Graphics2D gfx)
FrameManager after everything is done painting, allowing us to paint
gloriously overtop of everything in the frame.
public Graphics2D createGraphics()
MediaHost
createGraphics in interface MediaHostpublic void tick(long tickStamp)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||