This class is the base class for all applications that provide a UI. The UiApplication object maintains the stack of Screen objects for the application. The BlackBerry® device application object that you create must extend this class. After you create this object, you can add it to the event dispatcher to start the application and push the initial Screen onto the application's Screen stack.
In the sample application, the HelloWorldDemo class extends UiApplication. The HelloWorldDemo constructor creates the initial Screen and pushes it onto the application's Screen stack.
This class is a basic Screen object that contains a title section, a main scrollable section, and a separator element to separate the two sections. The main scrollable section is a single vertical field manager that lists the fields from top to bottom in the order that you add them. A BlackBerry device application extends this class to create a specific screen for the application.
In the sample application, the inner class, HelloWorldScreen, extends MainScreen. The HelloWorldScreen constructor specifies the title and displays a RichTextField with the text "Hello World!". The HelloWorldScreen class also overrides the close() method that is inherited from the Screen class. The application processes the close() method when the Screen is removed from the stack. In the sample application, the close() method displays a Dialog with the text "Goodbye!".
- This class is the base class for all UI components. You cannot create this class. You use one of the specialized field components from the net.rim.device.api.ui.component package or extend this class to create your own custom UI component.
- In the sample application, you only use this class to access the constant Field.NON_FOCUSABLE. The RichTextField constructor takes this constant as a parameter to specify that the user cannot focus on the RichTextField.
This class provides a dialog box with predefined configurations such as a dialog box for confirming a deletion, a dialog box with an OK button, a dialog box with an OK and a Cancel button, and several other standard configurations.
In the sample application, an alert dialog box with the message "Goodbye!" appears when the user closes the HelloWorldScreen screen.
This class provides a field to display text on the screen.
The sample application uses a LabelField object to define the title of the screen.
This class provides a field to display text in a variety of fonts and formatting.
The sample application uses a RichTextField to display the "Hello World!" text on the screen.