Lista de filmes java micro edition
public class Filmes extends MIDlet {
private Display display; private int mode = List.IMPLICIT; private Command exitCommand = new Command( "Sair",Command.SCREEN, 2 ); private Command selectCommand = new Command( "Selecionar",Command.OK, 1 ); /** * */
public Filmes(){ }
protected void destroyApp( boolean unconditional ) throws MIDletStateChangeException { exitMIDlet(); }
protected void pauseApp(){ }
protected void startApp() throws MIDletStateChangeException { if( display == null ){ initMIDlet(); } }
private void initMIDlet(){ display = Display.getDisplay( this ); display.setCurrent( new SampleList( mode ) ); }
public void exitMIDlet(){ notifyDestroyed(); }
public static String[] items = { "AI: inteligência Artificial", "Matrix", "Eu,robô", "Blade Runner", "A senha:Swordfish", };
class SampleList extends List implements CommandListener {
private int mode; private Command nextCommand;
SampleList( int mode ){ super( "", mode, items, null ); addCommand( exitCommand ); addCommand( selectCommand ); setCommandListener( this );
switch( mode ){ case IMPLICIT: setTitle( "Filmes" ); break; }
this.mode = mode; }
public void commandAction( Command c, Displayable d ){ if( c == exitCommand ){ exitMIDlet(); } else if( c == selectCommand ){ showSelection( true ); } else if( c == SELECT_COMMAND ){ showSelection( true );