|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanger.app.Listener
danger.ui.View
danger.ui.AnimatedBitmapView
public class AnimatedBitmapView
Use an AnimatedBitmapView to display an AnimatedBitmap object.
This class handles all of the timing and interaction with
AnimatedBitmap. Generally, all you need to do is call
setAnimation(danger.ui.AnimatedBitmap).
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
AnimatedBitmapView()
Create an instance. |
|
| Method Summary | |
|---|---|
protected void |
onHide()
This method is called when this view is hidden, via the method View.hide(). |
protected void |
onShow()
This method is called when this view is shown, via the method View.show(). |
void |
paint(Pen pen)
Draw the contents of this View. |
void |
play()
Play the animation. |
boolean |
receiveEvent(Event e)
Entry point for event processing. |
void |
setAnimation(AnimatedBitmap ab)
Set the animation for the view. |
void |
setLoop(boolean loop)
Specify whether the animation should loop. |
void |
stopPlaying()
Stop playing the animation. |
| Methods inherited from class danger.app.Listener |
|---|
cancelEvents, childEventPump, childEventPumpDone, eventProblem, isDispatchingThread, sendEvent, sendEvent, sendEvent, sendEvent, sendEvent, sendLowPriorityEvent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnimatedBitmapView()
| Method Detail |
|---|
protected void onShow()
ViewView.show(). It is called as the very last thing done by that method, and
it is only ever called if the view was not already visible.
Overriding this method is the recommended way to get special
behavior when a view gets shown.
The implementation in this class does nothin.
onShow in class Viewprotected void onHide()
ViewView.hide(). It is called as the very last thing done by that
method, and it is only ever called if the view was not already
hidden. Overriding this method is the recommended way to get special
behavior when a view gets hidden .
The implementation in this class does nothin.
onHide in class Viewpublic void setAnimation(AnimatedBitmap ab)
public void setLoop(boolean loop)
public boolean receiveEvent(Event e)
ListenerDispatcher when it reads an Event in its queue
that is targetted at this instance. The default behavior is to
do nothing and return false. Subclasses are expected
to override this method to do something more useful.
receiveEvent in class Listenere - non-null; the event to process
true) or not (false) this
method actually handled the event to completionpublic void stopPlaying()
AnimatedBitmap
was created using the AnimatedBitmap.CREATE_FLAG_PRE_DECODE or
AnimatedBitmap.CREATE_FLAG_CONSERVE_MEM flags.
public void play()
stopPlaying().
public void paint(Pen pen)
ViewThe implementation of this method in this class will merely call
clear() pen, if this View is opaque (not transparent),
and will do nothing otherwise. If you don't need this behavior, then
there is no point in calling super.paint() in an
overriding method.
paint in class Viewpen - non-null; the pen to use for drawing operations
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||