com.nokia.midp.examples.lcdui.helloworldplus
Class HelloWorldPlusMIDlet

java.lang.Object
  extended byjavax.microedition.midlet.MIDlet
      extended bycom.nokia.midp.examples.lcdui.helloworldplus.HelloWorldPlusMIDlet

public class HelloWorldPlusMIDlet
extends javax.microedition.midlet.MIDlet

This class illustrates the implementation of a simple MIDlet that initially displays a "HelloWorld" message to the screen and allows the user to edit that message.

This class extends the class javax.microedition.midlet.MIDlet. It creates and maintains references to a TextScreen object and a TextEditor object.

Note that the HelloWorldMIDlet class has no constructor. MIDlet contructors are not required to do anything because intializing of the object is better performed in the startApp() method.


Field Summary
private  javax.microedition.lcdui.Display display
          A generic way of indicating whether startApp() has previously been called.
private  TextEditor textEditor
          Allows the user to edit the message displayed.
private  TextScreen textScreen
          Displays the message on the screen.
 
Fields inherited from class javax.microedition.midlet.MIDlet
 
Constructor Summary
HelloWorldPlusMIDlet()
           
 
Method Summary
 void destroyApp(boolean unconditional)
          No further implementation is required because the MIDlet holds no resources that require releasing.
 void exitRequested()
          A convenience method for exiting.
 void pauseApp()
          This must be defined but no implementation is required because the MIDlet only responds to user interaction.
 void startApp()
          Creates an instance of TextScreen if one has not already been created and tells the framework to set this instance of TextScreen as the current screen.
 void textEditorDone(java.lang.String string)
          Implements the transition from the TextEditor screen to the TextScreen screen.
 void textEditorRequested()
          Implements the transition from the TextScreen screen to the TextEditor screen.
 
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

textScreen

private TextScreen textScreen
Displays the message on the screen.


textEditor

private TextEditor textEditor
Allows the user to edit the message displayed.


display

private javax.microedition.lcdui.Display display
A generic way of indicating whether startApp() has previously been called.

Constructor Detail

HelloWorldPlusMIDlet

public HelloWorldPlusMIDlet()
Method Detail

startApp

public void startApp()
Creates an instance of TextScreen if one has not already been created and tells the framework to set this instance of TextScreen as the current screen.


pauseApp

public void pauseApp()
This must be defined but no implementation is required because the MIDlet only responds to user interaction.


destroyApp

public void destroyApp(boolean unconditional)
No further implementation is required because the MIDlet holds no resources that require releasing.

Parameters:
unconditional - is ignored.

exitRequested

public void exitRequested()
A convenience method for exiting.


textEditorDone

public void textEditorDone(java.lang.String string)
Implements the transition from the TextEditor screen to the TextScreen screen.

Parameters:
string - is the new text to be displayed. It is null if the text is not to be changed.

textEditorRequested

public void textEditorRequested()
Implements the transition from the TextScreen screen to the TextEditor screen.