The bluegammon.gui.menu package is a standalone package for drawing menus on a canvas in J2ME.

Concepts and Structures

This package defines a user interface component visualizing a menu consisting of pages that have items. Each item can have an action.

The main class is the Menu. The Menu consists of a MenuPage as start page and a MenuPainter implementation. Each MenuPage have zero or several PageItems that defines possible choices per MenuPage. A PageItem can have one implementation of ItemAction, and/or a MenuPage as sub-page that will be navigated to when selecting and activating that item.
All implementations of ItemAction are invoked in a new thread on the activation of a PageItem.

The navigation tree of a menu can be defined in two ways: