Structure of the MIDP User Interface API in Java

Paint PDF-417 2d barcode in Java Structure of the MIDP User Interface API
82 Structure of the MIDP User Interface API
Draw PDF417 In Java
Using Barcode generation for Java Control to generate, create PDF-417 2d barcode image in Java applications.
The following sections provide an overview to the MIDP user interface API (javaxmicroeditionlcdui) The remainder of this chapter and the following two chapters concentrate on the high-level parts of the API The low-level user interface API features are detailed in 11, "MIDP Low-Level User Interface Libraries"
Encoding Bar Code In Java
Using Barcode creator for Java Control to generate, create barcode image in Java applications.
The separation of high-level and low-level API is often not very clear-cut There are many classes that are used both in low-level and high-level APIs For example, classes Image and Font are used both in high-level Screen components and low-level graphics drawing Also, in MIDP 20 the new CustomItem class makes it possible to mix low-level graphics and high-level components within a Form object
Barcode Decoder In Java
Using Barcode scanner for Java Control to read, scan read, scan image in Java applications.
MIDP 20 also includes a new game-specific API provided in javaxmicroeditionlcduigame package The MIDP 20 Game API is discussed in 12
PDF 417 Generator In C#
Using Barcode printer for .NET framework Control to generate, create PDF 417 image in .NET applications.
821 Displayable Model
Painting PDF417 In .NET Framework
Using Barcode drawer for ASP.NET Control to generate, create PDF417 image in ASP.NET applications.
The central abstraction of the MIDP user interface is class Displayable Class Displayable helps organize the user interface into manageable pieces This results in user interfaces that are easy to use and learn Each MIDP application has a Display on which a single Displayable object is shown The application sets and resets the current Displayable object on the Display for each step of the task, based on user interactions The user tasks (interactions with the user interface) are implemented using Command objects The application is notified automatically when a Command is selected by the user As a result of these notifications the application often changes the current Displayable to some other Displayable The device software manages the sharing of the physical display between the native applications and the MIDP applications
PDF 417 Generator In Visual Studio .NET
Using Barcode drawer for .NET framework Control to generate, create PDF417 image in VS .NET applications.
The rationale behind the displayable-oriented approach is based on the wide variations in display and keypad configurations found in MIDP devices Each device provides a consistent look and feel by handling the component layout, painting, scrolling, and focus traversal If an application needed to be aware of these details, portability would be difficult to achieve, and smooth integration with the look and feel of the device and its native applications would place a heavy burden on application developers
Painting PDF 417 In VB.NET
Using Barcode printer for VS .NET Control to generate, create PDF-417 2d barcode image in .NET framework applications.
There is a hierarchy of Displayable subclasses called Screens in the lcdui API Each Screen is a functional user interface element that encapsulates device-specific graphics rendering and user input handling Figure 81 shows the hierarchy of the user interface classes
Draw Bar Code In Java
Using Barcode generation for Java Control to generate, create bar code image in Java applications.
Figure 81 MIDP user interface class hierarchy (all classes not shown)
DataMatrix Generator In Java
Using Barcode maker for Java Control to generate, create ECC200 image in Java applications.
[ Team LiB ]
Code128 Maker In Java
Using Barcode encoder for Java Control to generate, create Code128 image in Java applications.
[ Team LiB ]
Encoding USS Code 39 In Java
Using Barcode generation for Java Control to generate, create Code-39 image in Java applications.
83 Display
Print Bar Code In Java
Using Barcode maker for Java Control to generate, create bar code image in Java applications.
The Display class is the central controller of the display of a MIDP application An application gets a Display instance by calling the static method getDisplay and by passing the MIDlet instance to the method:
Making Uniform Symbology Specification ITF In Java
Using Barcode generator for Java Control to generate, create 2 of 5 Interleaved image in Java applications.
Display midletDisplay = DisplaygetDisplay(myMIDlet);
UPC Code Creator In .NET Framework
Using Barcode maker for VS .NET Control to generate, create UPC Symbol image in VS .NET applications.
When the Display instance is obtained, the application can change the Displayables presented on the device using the methods of the Display class There are three methods in class Display that allow the application to set the current Displayable instance presented on the device display The most commonly used method is:
Decoding Barcode In .NET
Using Barcode decoder for .NET framework Control to read, scan read, scan image in VS .NET applications.
public void setCurrent(Displayable nextDisplayable)
Read Code 3 Of 9 In .NET
Using Barcode recognizer for .NET Control to read, scan read, scan image in .NET applications.
The two other methods are provided for more specialized use:
DataMatrix Maker In Visual C#
Using Barcode creator for Visual Studio .NET Control to generate, create ECC200 image in VS .NET applications.
public void setCurrent(Alert alert, Displayable nextDisplayable) public void setCurrentItem(Item item)
Draw GS1 - 13 In .NET
Using Barcode creator for .NET framework Control to generate, create EAN-13 image in Visual Studio .NET applications.
The first of these specialized methods sets an Alert to be displayed and also provides the Displayable that is presented after the Alert is dismissed See Section 93, "Alert" The second of these specialized methods presents a specific Item attached to a Form instance The Form that has the Item is set as the current displayable, and it is scrolled so that the Item becomes visible Focus, if supported by device, moves to this Item
Paint Data Matrix 2d Barcode In Visual Studio .NET
Using Barcode maker for Visual Studio .NET Control to generate, create Data Matrix ECC200 image in VS .NET applications.
831 Current Displayable
Print Code 39 Full ASCII In Visual Studio .NET
Using Barcode creator for .NET Control to generate, create USS Code 39 image in Visual Studio .NET applications.
Technically, the methods just discussed set only the current displayable of class Display During the lifecycle of the application the current Displayable never again is null after it has been initially set at application startup The current Displayable is made visible by the device software referred to as application management software (AMS) in MIDP Specification (see Section 192, "MIDP System Software") The current Displayable is visible when the application is in the foreground
There often are, however, situations when the application management software moves the application to the background, and thus the current Displayable is not actually visible The current Displayable does not change in these cases Applications are commonly moved to background upon system events such as incoming calls in a phone device or upon certain other system notifications When the application management software decides that the application can again be brought to the foreground, the current Displayable is simply made visible
The application can determine whether a Displayable is visible on the display by calling the method isShown In the case of Canvas and CustomItem, the showNotify and hideNotify methods are called when the component is made visible and is hidden, respectively Applications need to override showNotify and hideNotify methods in Canvas or CustomItem subclasses to be able receive these notifications
[ Team LiB ]
[ Team LiB ]