public class MediaOverlay extends Object implements MediaHost
FrameManager. The media
overlay coordinates through the ActiveRepaintManager to repaint areas of the screen that
it has left dirty.| Modifier and Type | Method and Description |
|---|---|
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.
|
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()
MediaHostcreateGraphics in interface MediaHostpublic void tick(long tickStamp)
Copyright © 2015. All rights reserved.