example.pushpuzzle
Class PushPuzzle

java.lang.Object
  extended by javax.microedition.midlet.MIDlet
      extended by example.pushpuzzle.PushPuzzle
All Implemented Interfaces:
javax.microedition.lcdui.CommandListener

public class PushPuzzle
extends javax.microedition.midlet.MIDlet
implements javax.microedition.lcdui.CommandListener

PushPuzzle is the MIDlet that drives the game. It puts up the screens and handles all the commands that are invoked on each screen.


Field Summary
(package private)  javax.microedition.lcdui.Display display
           
 
Constructor Summary
PushPuzzle()
          Creates new PushPuzzle MIDlet.
 
Method Summary
 void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable s)
          Respond to a commands issued on any Screen
 void destroyApp(boolean unconditional)
          Destroy must cleanup everything.
 void pauseApp()
          Pause signals the thread to stop by clearing the thread field.
 void startApp()
          Start creates the thread to do the timing.
 
Methods inherited from class javax.microedition.midlet.MIDlet
checkPermission, getAppProperty, notifyDestroyed, notifyPaused, platformRequest, resumeRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

display

javax.microedition.lcdui.Display display
Constructor Detail

PushPuzzle

public PushPuzzle()
Creates new PushPuzzle MIDlet.

Method Detail

startApp

public void startApp()
Start creates the thread to do the timing. It should return immediately to keep the dispatcher from hanging.

Specified by:
startApp in class javax.microedition.midlet.MIDlet

pauseApp

public void pauseApp()
Pause signals the thread to stop by clearing the thread field. If stopped before done with the iterations it will be restarted from scratch later.

Specified by:
pauseApp in class javax.microedition.midlet.MIDlet

destroyApp

public void destroyApp(boolean unconditional)
Destroy must cleanup everything. Only objects exist so the GC will do all the cleanup after the last reference is removed.

Specified by:
destroyApp in class javax.microedition.midlet.MIDlet

commandAction

public void commandAction(javax.microedition.lcdui.Command c,
                          javax.microedition.lcdui.Displayable s)
Respond to a commands issued on any Screen

Specified by:
commandAction in interface javax.microedition.lcdui.CommandListener