MicroWidgets is a library that provides graphic components for MIDP on which programmers can control look&feel.
Indeed, MIDP specifications let the virtual machine implementation decide how to render graphic components. Thus, there are as many rendering as of platforms (Palm, iPAQ, cell phone, ...), and most of the time it is rendered with a poor black&white look.
With this library, you can control the aspect of graphic components in order to provide a prettier interface.
Key points:
- Total control of rendering: You can control all colors, layout, and more...
- Full MIDP 1.0 compatible: You do not need a special virtual machine.
- Small: Using this library only adds 50-60k to your midlet suite package.
- Fast to learn: Follows existing standards for components and event management.
- Simple to use: Simple interfaces, full documented javadoc with examples, this detailed web site.
- Reliable: The test module provides a way to test all class features on each version when published.
- Free: The LGPL license permit you to freely use and include this library in your products.
There is a visual example on a cell phone:
Using MIDP standard Using this library
Implemented components:
- Button for buttons with text, image, or empty (just the raised border).
- CheckBox for inclusive check boxes.
- DigitTextField for entering positive or null integers.
- ExclusiveChoice for exclusive choices (rendered as radio buttons, or a field with multiple values).
- Hyperlink for a standard hyperlink.
- ImageItem for a decorative image.
- Slider for adjusting a numeric value (rendered as a graphic line with cursor, or a field with buttons to increment/decrement the value).
- String for decorative text.
- TextField for a standard entry field.
Warning: Due to current MIDP specifications limitation, TextField don't accept accents or special characters. In fact, it depends on the way the virtual machine implements the Canvas.keyPressed(int keyCode) method and which keyCode values this method can detect and return.
This problem is the major weakness of this library. If you have to use a text field that accept all characters, you still must use the javax.microedition.lcdui.TextField standard MIDP class without rendering control, and within a javax.microedition.lcdui.Form standard container.
Implemented containers:
- XYPanel let you place your components by their coordinates.
- RowPanel manages component layout in the read order (left to rigth, then up to down).
- ActionListener for actions (Button, CheckBox, Hyperlink).
- ContainerListener for component addition or removal (XYPanel et RowPanel).
- FocusListener for focus gain or loss (All components).
- ItemListener for component visibility (All components).
- ValueChangeListener for value changes (DigitTextField, ExclusiveChoice, Slider, TextField).
Following information is available on this Web site:
- Detailed documentation on this library.
- A module for unit tests of all components.
- Downloads and links for this project.
MicroWidgets is distributed under the "GNU Lesser General Public License".