Methods Summary |
---|
public void | commandAction(Command c, Displayable s)
if (c == exitCommand) {
destroyApp(false);
notifyDestroyed();
} else if ((s == theList && c == List.SELECT_COMMAND) || c == playCommand) {
idx = theList.getSelectedIndex();
new Thread(this).start();
}
|
public void | destroyApp(boolean unconditional)Destroy must cleanup everything not handled by the garbage collector.
if (game != null)
game.destroy();
|
public static example.audiodemo.BBall | getInstance()
return instance;
|
public static List | getList()
return theList;
|
public void | pauseApp()Pause is a no-op since there are no background activities or
record stores that need to be closed.
|
public void | run()
game = new BallCanvas(display, 5, idx);
if (game.needAlert()) {
Alert alert = new Alert("Warning", "Can not create player", null, null);
alert.setTimeout(1000);
display.setCurrent(alert, game);
} else {
display.setCurrent(game);
}
game.start();
|
public void | startApp()
display.setCurrent(theList);
|