In this section, all the class and method level changes have been listed. It covers the new APIs in the com.nokia.lwuit package, new methods added to the original LWUIT classes in com.sun.lwuit package, and information on the areas where the API is unmodified but it has been modified to use Series 40 platform implementation.
LWUIT for Series 40 library has an additional package com.nokia.lwuit that does not exist in the original LWUIT. This package contains classes for accessing Nokia proprietary APIs and some utility classes.
Most of the Nokia proprietary APIs are accessed via wrappers using indirect references to the classes, so the application does not crash when using the APIs on older Series 40 devices where the APIs might not exist. Note, however, that you should not rely on the existence of com.nokia.lwuit package and its classes if you want to maintain API compatibility with the original LWUIT.
Here is a list of the classes in com.nokia.lwuit package:
com.nokia.lwuit.CategoryBarProvider
com.nokia.lwuit.Dbug
com.nokia.lwuit.DirectUtilsProvider
com.nokia.lwuit.GestureHandler
com.nokia.lwuit.ImageUtils
com.nokia.lwuit.MIDPCommandWrapper
com.nokia.lwuit.OrientationListener
com.nokia.lwuit.OrientationProvider
com.nokia.lwuit.TextEditorProvider
com.nokia.lwuit.components.ContextMenu
com.nokia.lwuit.components.PopupChoiceGroup
com.nokia.lwuit.templates.list.BasicListItem
com.nokia.lwuit.templates.list.NokiaListCellRenderer
LWUIT for Series 40 has also some added functionality in the classes under com.sun.lwuit package. If you need to maintain compatibility with the original LWUIT, you should avoid using those methods directly.
Class |
Added methods |
---|---|
com.sun.lwuit.Dialog |
|
com.sun.lwuit.Display |
|
com.sun.lwuit.EncodedImage |
|
com.sun.lwuit.Form |
|
com.sun.lwuit.Label |
|
com.sun.lwuit.MenuBar |
|
com.sun.lwuit.Slider |
|
com.sun.lwuit.TextArea |
|
com.sun.lwuit.TextField |
|
com.sun.lwuit.plaf.UIManager |
|
Note that in LWUIT for Series 40 port, some of the original LWUIT classes of the com.sun.lwuit package use Nokia proprietary APIs internally. That is, the implementations of some LWUIT UI components take advantage of the Nokia APIs when possible, but fall back to pure LWUIT solution if the APIs are not available. Examples of such classes are TextArea and TextField which use the TextEditor from Nokia UI package. This affects also the virtual keyboard that is displayed on context of TextArea and TextField.
The API compatibility is maintained and thus it should not affect porting between the original LWUIT and LWUIT for Series 40 . Note, however, that the experience of running the application using LWUIT for Series 40 may differ from original LWUIT application in these cases.