Java Reference
In-Depth Information
mMainScreen.append(kSoundOfMusic, null);
mMainScreen.append(kQuandoMenVo, null);
mMainScreen.append(kTwinkle, null);
mMainScreen.addCommand(new Command("Exit", Command.EXIT, 0));
mMainScreen.addCommand(new Command("Play", Command.SCREEN, 0));
mMainScreen.setCommandListener(this);
}
mDisplay.setCurrent(mMainScreen);
}
public void pauseApp() {}
public void destroyApp(boolean unconditional) {}
public void commandAction(Command c, Displayable s) {
if (c.getCommandType() == Command.EXIT) notifyDestroyed();
else run();
}
public void run() {
String selection = mMainScreen.getString(
mMainScreen.getSelectedIndex());
byte[] sequence = null;
if (selection.equals(kSoundOfMusic)) {
sequence = new byte[] {
ToneControl.VERSION, 1,
67, 16, // The
69, 16, // hills
67, 8, // are
65, 8, // a -
64, 48, // live
62, 8, // with
60, 8, // the
59, 16, // sound
57, 16, // of
59, 32, // mu -
59, 32 // sic
};
}
Search WWH ::




Custom Search