MIDP GUI Programming, Part 1
Pages: 1, 2
The lcdui Package
All MIDP GUI classes are contained in the javax.microedition.lcdui package. This package contains three interfaces and twenty-one classes, as shown in Table 1 and Table 2.
| Table 5-1: lcdui interfaces | |
|
Interface |
Description |
|---|---|
|
|
Defines an API for a user interface component that implements a selection from a predefined number of choices |
|
|
Used by applications that need to receive high-level events from implementations |
|
|
Used by applications that need to receive events that indicate changes in the internal state of the interactive items |
| Table 2: lcdui classes | |
|
Class |
Description |
|---|---|
|
|
A screen that shows data to the user and waits for a certain period of time before proceeding to the next screen. |
|
|
A utility class that indicates the nature of the alert. |
|
|
The base class for writing applications that need to handle low-level events and to issue graphics calls for drawing to the display. |
|
|
A group of selectable elements intended to be placed within a |
|
|
A construct that encapsulates the semantic information of an action. |
|
|
An editable component for presenting calendar data and time information that may be placed into a |
|
|
A utility that represents the manager of the display and input devices of the system. |
|
|
An object that has the capability of being placed on the display. |
|
|
A utility that represents font and font metrics. |
|
|
A screen that contains an arbitrary mixture of items (images, text, text fields, or choice groups, for instance). |
|
|
A utility that implements a bar graph display of a value intended for use in a form. |
|
|
A utility that provides a simple two-dimensional geometric rendering capability. |
|
|
A utility that holds graphical image data. |
|
|
A utility that provides layout control when |
|
|
A superclass for all components that can be added to a |
|
|
A screen containing a list of choices. |
|
|
The superclass of all high-level user interface classes. |
|
|
An item that can contain a |
|
|
A screen that allows the user to enter and edit text. |
|
|
An editable text component that can be placed into a |
|
|
A ticker-type piece of text that runs continuously across the display. It can be attached to all screen types except |
The class diagram in Figure 4 shows the major classes and the relationships between them.
|
Next week, we continue exploring the wireless Java MIDP GUI API by focusing on the High-Level MIDP APIs
View catalog information for Learning Wireless Java
Return to ONJava.com.
