|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbluegammon.gui.animation.Animation
bluegammon.gui.animation.PieceMoveAnim
Animation of a piece moving from an source index to a destination index.
Constructor Summary | |
PieceMoveAnim(boolean white,
int source,
int dest,
int piecesOnSource,
int piecesOnDest)
Creates a new piece movement animation. |
Method Summary | |
long |
getInterval()
Returns interval time in milliseconds when the animation should be updated, i.e. the next method is invoked. |
static void |
init(int pieceSize)
Initializes this animation with the size of the piece, which is depending on the canvas size. |
boolean |
isFinished()
Probes to check if the animation can be removed |
void |
next()
Called each time the animation should be updated. |
void |
onExit()
Override this to invoke functionality at the end of this animation |
void |
onStart()
Override this to invoke functionality at the start of this animation |
void |
paint(javax.microedition.lcdui.Graphics g)
Draws the animation using the specified graphics context. |
Methods inherited from class bluegammon.gui.animation.Animation |
callNext, getLastInvoke |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PieceMoveAnim(boolean white, int source, int dest, int piecesOnSource, int piecesOnDest)
white
- True for white piece, false for black.source
- Source index of piece.dest
- Destination index of piece.piecesOnSource
- Number of pieces on source index.piecesOnDest
- Number of pieces on destination index.Method Detail |
public static void init(int pieceSize)
pieceSize
- The size of the piece.public void onStart()
Animation
onStart
in class Animation
public void paint(javax.microedition.lcdui.Graphics g)
Animation
paint
in class Animation
g
- The graphics context.public void next()
Animation
next
in class Animation
public boolean isFinished()
Animation
isFinished
in class Animation
public void onExit()
Animation
onExit
in class Animation
public long getInterval()
Animation
next
method is invoked.
getInterval
in class Animation
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |