Look and feel

While a theme is remarkably powerful and relatively simple, it does not allow the deep type of customisation some applications require. Developers would often like the ability to control the drawing of all widgets from a single location, relieving them of the need to subclass widgets and manipulate their paint behaviour.

LWUIT delegates all drawing to a single abstract base class called LookAndFeel, an instance of which may be obtained from the UIManager. This class has a concrete subclass which provides the default LWUIT look called DefaultLookAndFeel. Both LookAndFeel and DefaultLookAndFeel may be subclassed in order to extend/replace their functionality.

The look and feel class has methods for determining the boundaries (preferred size) of component types and for painting all components. In addition it has some special methods that allow you to bind special logic to components and manually draw widgets such as scroll bars. It is the responsibility of the Look and Feel developer to properly use the Style objects delivered by the theme. If you replace the look and feel class, you must make sure to extract values appropriately from component styles of the theming functionality or LWUIT can break.

Check the API documentation for further details LookAndFeel and DefaultLookAndFeel classes.