MIDlet Specifics
When a MIDlet is opened, a new node is added to the Parts tree with the name of the MIDlet. In addition, every MIDlet has 9 built-in nodes which cannot be removed or reordered. They are
The MIDlet itself has only one property which can be directly changed by the user: its name.
- Declarations This code area should be used to declare any static variables or instance variables that a MIDlet may need. Any java statement which is legal to exist within the outermost scope of a Java class can be added here. All MIDlets created by Simplicity have a Display object named 'display' set up in this area.
- Constructor This code area should be used for any additional initialization code that a MIDlet may need. Any legal Java statements may be placed here. This code will be appended to the class constructor. All MIDlets created by Simplicity will set the display object to be equal to the Display of the MIDlet in this area.
- Methods This code area should be used to declare any static methods or instance methods that a program may need.
- startApp This code area should be used to perform any setup a MIDlet may need to perform to become active. It will be called on MIDlets which have been paused. This code will be the startApp method of the MIDlet. If the checkbox in the Display node is not checked, this area should be used set the first display of the MIDlet.
- pauseApp This code area should be used to perform any code a MIDlet may need to release resources and pause. This code will be the pauseApp method of the MIDlet.
- destroyApp This code area should be used to perform any operations needed before a MIDlet is stopped, like releasing resources or saving preferences. This code will be the destroyApp method of the MIDlet. The destroyApp method signals that a MIDlet is not ready to be disposed by throwing a MIDletStateChangeException; however, this Exception will be ignored if the boolean passed to destroyApp was 'true'.
- Images This area displays a list of the available images in the MIDlet. Images which have already been chosen in other parts of the MIDlet will be listed. In addition, users may add images manually in this property sheet. The image path and object name is listed in this node.
- Threads This is the area where Runnable and Timer Task objects can be added to the MIDlet. These objects let your MIDlet run code in the background, or perform periodic tasks.
- Display This is the area where displayables can be added to the MIDlet to set the screens which will be shown. It also shows what the first display of the MIDlet will be. The first display of a MIDlet is, by definition, the first non-Alert display contained in the display node. For more information about displays, see page 70. The checkbox on this page allows the user to turn off the automatic generation of code to set the first display. If the checkbox is unchecked, then this code should be added to the startApp area by the user.
| Data Representations, Inc. http://www.datarepresentations.com support@datarepresentations.com sales@datarepresentations.com |