|
|||||||||||
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.AbstractDicesAnim
An abstract animation of two dices - we do not have a case where we ever show only one dice. This is an general handler for rolling two dices that will have specified color and dice-value each.
Constructor Summary | |
AbstractDicesAnim(boolean dice1White,
boolean dice2White,
int dice1Val,
int dice2Val)
Initiates this 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 factor)
Initializes this animation, must be called before displaying any diceanimations. |
boolean |
isFinished()
Probes to check if the animation can be removed |
void |
next()
Called each time the animation should be updated. |
void |
onStart()
Called when the animation starts, resets the state of the sound. |
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, onExit |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractDicesAnim(boolean dice1White, boolean dice2White, int dice1Val, int dice2Val)
dice1White
- True if left dice is white, false for black,dice2White
- True if right dice is white, false for black,dice1Val
- Left dice value, 1 to 6.dice2Val
- Right dice value, 1 to 6.Method Detail |
public static void init(int factor)
factor
- The size factor of the dices, depends
on the canvas size of the device.public void onStart()
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 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 |