| Modifier and Type | Field and Description |
|---|---|
static int |
HUD_LAYER
A
_renderOrder value at or above which, indicates that this media is in the HUD
(heads up display) and should not scroll when the view scrolls. |
| Constructor and Description |
|---|
AbstractMedia(Rectangle bounds)
Instantiate an abstract media object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(double x,
double y) |
boolean |
contains(double x,
double y,
double w,
double h) |
boolean |
contains(Point2D p) |
boolean |
contains(Rectangle2D r) |
void |
fastForward(long timeDelta)
Called when the appropriate media manager has been paused for some length of time and is
then unpaused.
|
Rectangle |
getBounds()
Returns a rectangle containing all the pixels rendered by this media.
|
Rectangle2D |
getBounds2D() |
PathIterator |
getPathIterator(AffineTransform at) |
PathIterator |
getPathIterator(AffineTransform at,
double flatness) |
int |
getRenderOrder()
Returns the render order of this media element.
|
void |
init(AbstractMediaManager manager)
Initialize the media.
|
boolean |
intersects(double x,
double y,
double w,
double h) |
boolean |
intersects(Rectangle2D r) |
void |
invalidate()
Invalidate the media's bounding rectangle for later painting.
|
abstract void |
paint(Graphics2D gfx)
Called by the appropriate manager to request that the media render itself with the given
graphics context.
|
void |
queueNotification(ObserverList.ObserverOp<Object> amop)
Queues the supplied notification up to be dispatched to this abstract media's observers.
|
int |
renderCompareTo(AbstractMedia other)
Compares this media to the specified media by render order.
|
void |
setLocation(int x,
int y)
Set the location.
|
void |
setRenderOrder(int renderOrder)
Sets the render order associated with this media.
|
abstract void |
tick(long tickStamp)
Called periodically by this media's manager to give it a chance to do its thing.
|
String |
toString() |
void |
viewLocationDidChange(int dx,
int dy)
Called by the
AbstractMediaManager when we are in a VirtualMediaPanel that
just scrolled. |
public static final int HUD_LAYER
_renderOrder value at or above which, indicates that this media is in the HUD
(heads up display) and should not scroll when the view scrolls.public AbstractMedia(Rectangle bounds)
public abstract void tick(long tickStamp)
tickStamp - a time stamp associated with this tick. Note: this is not obtained
from a call to System.currentTimeMillis() and cannot be compared to timestamps
obtained there from.public abstract void paint(Graphics2D gfx)
public void fastForward(long timeDelta)
public void invalidate()
public void setLocation(int x,
int y)
public Rectangle getBounds()
public Rectangle2D getBounds2D()
getBounds2D in interface Shapepublic boolean intersects(double x,
double y,
double w,
double h)
intersects in interface Shapepublic boolean intersects(Rectangle2D r)
intersects in interface Shapepublic boolean contains(double x,
double y,
double w,
double h)
public boolean contains(Rectangle2D r)
public PathIterator getPathIterator(AffineTransform at)
getPathIterator in interface Shapepublic PathIterator getPathIterator(AffineTransform at, double flatness)
getPathIterator in interface Shapepublic int renderCompareTo(AbstractMedia other)
public void setRenderOrder(int renderOrder)
This method may not be called during a tick.
HUD_LAYERpublic int getRenderOrder()
public void queueNotification(ObserverList.ObserverOp<Object> amop)
public void viewLocationDidChange(int dx,
int dy)
AbstractMediaManager when we are in a VirtualMediaPanel that
just scrolled.public final void init(AbstractMediaManager manager)
Copyright © 2015. All rights reserved.