test
Class GoogleTranslateJavaMEInteractiveSample

java.lang.Object
  extended by javax.microedition.midlet.MIDlet
      extended by test.GoogleTranslateJavaMEInteractiveSample
All Implemented Interfaces:
javax.microedition.lcdui.CommandListener

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


Constructor Summary
GoogleTranslateJavaMEInteractiveSample()
           
 
Method Summary
 void commandAction(javax.microedition.lcdui.Command command, javax.microedition.lcdui.Displayable displayable)
          Called by a system to indicated that a command has been invoked on a particular displayable.
 void destroyApp(boolean unconditional)
          Called to signal the MIDlet to terminate.
 void exitMIDlet()
          Exits MIDlet.
 javax.microedition.lcdui.Command getCancelCommand()
          Returns an initiliazed instance of cancelCommand component.
 javax.microedition.lcdui.Display getDisplay()
          Returns a display instance.
 javax.microedition.lcdui.Form getForm()
          Returns an initiliazed instance of form component.
 javax.microedition.lcdui.Command getOkCommand()
          Returns an initiliazed instance of okCommand component.
 javax.microedition.lcdui.TextField getTxtLanguageCode()
          Returns an initiliazed instance of txtLanguageCode component.
 javax.microedition.lcdui.TextField getTxtTextToTranslate()
          Returns an initiliazed instance of txtTextToTranslate component.
 void pauseApp()
          Called when MIDlet is paused.
 void resumeMIDlet()
          Performs an action assigned to the Mobile Device - MIDlet Resumed point.
 void startApp()
          Called when MIDlet is started.
 void startMIDlet()
          Performs an action assigned to the Mobile Device - MIDlet Started point.
 void switchDisplayable(javax.microedition.lcdui.Alert alert, javax.microedition.lcdui.Displayable nextDisplayable)
          Switches a current displayable in a display.
 
Methods inherited from class javax.microedition.midlet.MIDlet
checkPermission, getAppProperty, notifyDestroyed, notifyPaused, platformRequest, resumeRequest
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GoogleTranslateJavaMEInteractiveSample

public GoogleTranslateJavaMEInteractiveSample()
Method Detail

startMIDlet

public void startMIDlet()
Performs an action assigned to the Mobile Device - MIDlet Started point.


resumeMIDlet

public void resumeMIDlet()
Performs an action assigned to the Mobile Device - MIDlet Resumed point.


switchDisplayable

public void switchDisplayable(javax.microedition.lcdui.Alert alert,
                              javax.microedition.lcdui.Displayable nextDisplayable)
Switches a current displayable in a display. The display instance is taken from getDisplay method. This method is used by all actions in the design for switching displayable.

Parameters:
alert - the Alert which is temporarily set to the display; if null, then nextDisplayable is set immediately
nextDisplayable - the Displayable to be set

commandAction

public void commandAction(javax.microedition.lcdui.Command command,
                          javax.microedition.lcdui.Displayable displayable)
Called by a system to indicated that a command has been invoked on a particular displayable.

Specified by:
commandAction in interface javax.microedition.lcdui.CommandListener
Parameters:
command - the Command that was invoked
displayable - the Displayable where the command was invoked

getForm

public javax.microedition.lcdui.Form getForm()
Returns an initiliazed instance of form component.

Returns:
the initialized component instance

getTxtTextToTranslate

public javax.microedition.lcdui.TextField getTxtTextToTranslate()
Returns an initiliazed instance of txtTextToTranslate component.

Returns:
the initialized component instance

getOkCommand

public javax.microedition.lcdui.Command getOkCommand()
Returns an initiliazed instance of okCommand component.

Returns:
the initialized component instance

getCancelCommand

public javax.microedition.lcdui.Command getCancelCommand()
Returns an initiliazed instance of cancelCommand component.

Returns:
the initialized component instance

getTxtLanguageCode

public javax.microedition.lcdui.TextField getTxtLanguageCode()
Returns an initiliazed instance of txtLanguageCode component.

Returns:
the initialized component instance

getDisplay

public javax.microedition.lcdui.Display getDisplay()
Returns a display instance.

Returns:
the display instance.

exitMIDlet

public void exitMIDlet()
Exits MIDlet.


startApp

public void startApp()
Called when MIDlet is started. Checks whether the MIDlet have been already started and initialize/starts or resumes the MIDlet.

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

pauseApp

public void pauseApp()
Called when MIDlet is paused.

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

destroyApp

public void destroyApp(boolean unconditional)
Called to signal the MIDlet to terminate.

Specified by:
destroyApp in class javax.microedition.midlet.MIDlet
Parameters:
unconditional - if true, then the MIDlet has to be unconditionally terminated and all resources has to be released.