| 1 | /** |
| 2 | Copyright (c) 2011, 2012, 2013 Research In Motion Limited. |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | **/ |
| 16 | package mypackage; |
| 17 | |
| 18 | import net.rim.device.api.ui.UiApplication; |
| 19 | |
| 20 | /** |
| 21 | * This class extends the UiApplication class, providing a |
| 22 | * graphical user interface. |
| 23 | */ |
| 24 | public class MyApp extends UiApplication |
| 25 | { |
| 26 | /** |
| 27 | * Entry point for application |
| 28 | * @param args Command line arguments (not used) |
| 29 | */ |
| 30 | public static void main(String[] args) |
| 31 | { |
| 32 | // Create a new instance of the application and make the currently |
| 33 | // running thread the application's event dispatch thread. |
| 34 | MyApp theApp = new MyApp(); |
| 35 | theApp.enterEventDispatcher(); |
| 36 | } |
| 37 | |
| 38 | |
| 39 | /** |
| 40 | * Creates a new MyApp object |
| 41 | */ |
| 42 | public MyApp() |
| 43 | { |
| 44 | // Push a screen onto the UI stack for rendering. |
| 45 | pushScreen(new MyScreen()); |
| 46 | } |
| 47 | } |