LWUIT Designer
The LWUIT Designer is a standalone GUI tool that allows UI experts, developers, and translators to
open, create, and edit resource packages for LWUIT. The LWUIT Designer was designed for visual
work and provides “live” preview of all UI changes, enabling rapid UI customization.
Currently the LWUIT Designer and
the Ant tasks (discussed in the
Developer's Guide) accomplish the
same thing, with one limitation. In
the LWUIT Designer all fonts used
by the Theme must be defined
within the theme itself. A theme
cannot reference a font defined in a
different resource file. This
limitation does not apply to the Ant
tasks.
The LWUIT Designer supports the
six LWUIT resource types: Image,
Animation, Theme, Font ,
Localization and Data. To use the
tool:
● Use File > Open to load an
existing resource (.res) file.
● To Add a resource click the button in the tab
representing the element type you wish to add &
specify a name for the resource. The new resource is
added under the appropriate tab.
● To create a new theme, select the Theme node, then
click the button. Note that a resource bundle can
contain more than one theme.
Note that the “live preview” is displayed for themes only and
represents the behavior of the theme alone. It doesn't contain the other resources in the file that do
not relate to the theme.
Images and Animations
Images and animations can be used either by a theme or by the LWUIT
application. The LWUIT Designer supports images (JPEG, PNG) and animated
GIFs. The images and animations can be replaced using the button.
Standard images can also be indexed. An indexed image takes less space in the
final application and occupies less memory space, however, it takes longer to
draw and supports up to 256 colors. When you toggle the indexed image radio
button, the number of colors is verified. If more than 256 colors are present the
application offers to try to reduce that number (with quality implications) it is recommended you
use an image editor tool to index the images beforehand.
Notice that an Alpha channel (beyond full transparency) might be somewhat problematic with
indexed images.
Illustration 1: Editing the Default LWUIT Look and Feel
Illustration 2: Add Resource Dialog
Illustration 3:
Image View