Your browser does not support JavaScript
Exit Print View

Lightweight UI Toolkit Developer’s Guide

Get PDF Book Print View

Document Information

Preface

1.  Introducing the Lightweight UI Toolkit Library

2.  Using Lightweight UI Toolkit Widgets

3.  Using Lists

4.  Table and Tree

5.  Using Dialogs

6.  Using Layout Managers

7.  Painters

8.  Using the Style Object

9.  LWUIT Implementation

9.1 LWUIT Class

10.  HTMLComponent

11.  Theming

12.  Resources

13.  Using Transitions and Animations

14.  M3G

15.  Logging

16.  Authoring Components

17.  Portability and Performance

A.  LWUIT Mini FAQ

Index

Chapter 9

LWUIT Implementation

The LWUIT implementation is the foundation of LWUIT and its portability. It is a single huge class representing a hardware abstraction layer (HAL) that contains all the platform-specific code within LWUIT.

WARNING:

The LWUIT implementation is a mechanism for the use of LWUIT developers and "deep hacking." It won't maintain compatibility between versions since it is not generally exposed for developers.

9.1 LWUIT Class

The underlying implementation is often replaced implicitly by using things like the CDC port of LWUIT, which is mostly an implementation class that delegates its calls to the appropriate CDC APIs rather than MIDP's APIs.

Developers should be aware that the LWUIT implementation can be replaced. That is, a developer relying on MIDP API's such as Canvas might run into errors when running on different platforms.

LWUIT ships with an SVGImplementation that can be installed by invoking:

SVGImplementationFactory.init();

Notice that this method must be invoked before Display.init() is invoked! The implementation cannot be replaced at runtime.

The SVGImplementation allows LWUIT to treat SVG image files as if they were standard LWUIT images.

LWUIT also features a VKBImplementation that allows binding a virtual keyboard for touch devices. There are several 3rd-party and LWUIT team implementations mostly designed for porting LWUIT to various platforms.