18
Lightweight
Windowing Toolkit
84
18
Lightweight Windowing Toolkit
LWT integrate with the LCDUI API within the MIDP and enhance the capabilities to
include a component-level API through which developers can control the contents and
layout of their screens. These components are graphical user interface elements such as
buttons, check boxes, text fields, images, etc. LWT also allow developers to create new
imaginative components or change the look and feel of existing components.
Those MIDlets taking advantage of the added capabilities of LWT will only run on those
handsets that incorporate the LWT LOC.
LWT extends the MIDP class hierarchy by extending the LCDUI Canvas class. The
ComponentScreen is a subclass of Canvas, which means it can be easily added to a
MIDP implementation and minimize dependencies and maintenance overhead. This also
allows standard MIDlets to mix both MIDP screens and LWT screens in their MIDlets.
LWT is designed to use MIDP low-level graphics routines exclusively, which adds to the
ease of implementation. Although no device-specific modifications are required, an LWT
implementation may be tailored to match the rest of the device’s user interface. The text
components in LWT may be integrated with the device’s data entry mechanisms, such as
handwriting recognition or predictive keypad input.
LWT implementation requires the handset to be MIDP compliant and have approximately
30KB of flash memory.
LWT does not expose any additional native interfaces and only relies on mechanisms
specified by MIDP 1.0. LWT can be safely exposed to untrusted MIDlets.
Once LWT is implemented, the LWT TCK must be completed and pass successfully.