Java Doc for StockMIDlet.java in  » IDE-Netbeans » mobility » example » stock » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » mobility » example.stock 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


example.stock.StockMIDlet

StockMIDlet
public class StockMIDlet extends MIDlet (Code)

The MIDlet application class that we'll run for the Stock Demo.



Field Summary
 Displaydisplay
    

Constructor Summary
public  StockMIDlet()
    

Method Summary
public  voiddestroyApp(boolean unconditional)
    

When the application management software has determined that the MIDlet is no longer needed, or perhaps needs to make room for a higher priority application in memory, is signals the MIDlet that it is a candidate to be destroyed by invoking the destroyApp(boolean) method.

public  voidpauseApp()
    

This method is invoked by the application management software when the MIDlet no longer needs to be active.

public  voidstartApp()
    

This method is invoked when the MIDlet is ready to run and starts/resumes execution after being in the Paused state.


Field Detail
display
Display display(Code)
The MIDlet's display object




Constructor Detail
StockMIDlet
public StockMIDlet() throws MIDletStateChangeException(Code)

Default constructor that is called by the application manager to create a new instance of this MIDlet after which the MIDlet enters the Paused state.





Method Detail
destroyApp
public void destroyApp(boolean unconditional) throws MIDletStateChangeException(Code)

When the application management software has determined that the MIDlet is no longer needed, or perhaps needs to make room for a higher priority application in memory, is signals the MIDlet that it is a candidate to be destroyed by invoking the destroyApp(boolean) method. In this case, we need to destroy the RecordEnumerations so that we don't waste their memory and close the open RecordStores. If the RecordStores are empty, then we do not need them to be stored as they will be recreated on the next invokation of the MIDlet so we should delete them. At the end of our clean up, we must call notifyDestroyed which will inform the application management software that we are done cleaning up and have finished our execution and can now be safely terminated and enters the Destroyed state.


Parameters:
  unconditional - If true when this method is called,the MIDlet mustcleanup and release all resources. If false the MIDletmay throw MIDletStateChangeException to indicate itdoes not want to be destroyed at this time. MIDletStateChangeExceptionis thrown if the MIDlet wishes to continue toexecute (Not enter the Destroyed state). Thisexception is ignored if unconditional is equalto true.
See Also:   javax.microedition.midlet.MIDlet



pauseApp
public void pauseApp()(Code)

This method is invoked by the application management software when the MIDlet no longer needs to be active. It is a stop signal for the MIDlet upon which the MIDlet should release any resources which can be re-acquired through the startApp method which will be called upon re-activation of the MIDlet. The MIDlet enters the Paused state upon completion of this method.


See Also:   javax.microedition.midlet.MIDlet



startApp
public void startApp()(Code)

This method is invoked when the MIDlet is ready to run and starts/resumes execution after being in the Paused state. The MIDlet acquires any resources it needs, enters the Active state and begins to perform its service, which in this case means it displays the main menu on the screen.

The method proceeds like so:

  • open the StockDatabase and the AlertDatabase
  • read the settings data from the settings RecordStore
  • create the string to be scrolled across the Ticker on the top of the screens and instantiate the Ticker object using that string. That string will be constructed of the names and prices of the stocks in our database
  • get and store the MIDlet's Display object
  • create and show the main menu
  • instantiate the TimerTask and Timer and associate the two setting the refresh interval to the value of the refresh_interval variable
  • MIDletStateChangeException is thrown if theMIDlet cannot start now but might be able tostart at a later time.
    See Also:   javax.microedition.midlet.MIDlet



    www.java2java.com | Contact Us
    Copyright 2009 - 12 Demo Source and Support. All rights reserved.
    All other trademarks are property of their respective owners.