Low-level APIs provide less abstraction than High-level APIs to give you greater control over the fine details instead. These components are designed for applications that need precise placement and control of graphic elements, customisable features and access to key input events coming from other sources than only soft keys. Applications programmed using the low-level components are not guaranteed to be portable, since the low-level API provides the means to access details that are specific to a particular device. A typical example of a low-level component-utilising application would be a game.
Using the low-level component, an application can:
Have full control of what is drawn on the display.
Listen for key presses and releases from all the keys in the mobile device.
Access concrete keys.
The main class of low-level user interaction is Canvas
. MIDP 2.1 provides another mechanism
for detecting key events on low-level UI classes. With GameCanvas
, it is possible to check which
keys have been pressed since the last check. Key-press status is reset
to zero after each check.
For more information about low-level UI implementation, see section Canvas
.
For more information on high-level APIs, see section High-level APIs.
The Graphics.drawChars
, Graphics.drawString
, and Graphics.drawSubstring
methods display each
new line character combination as a box glyph (an empty rectangle).