BigImageMenu

If an application program shall be equipped with a striking and intuitive image menu, the class BigImageMenu is the one to choose. This menu is optimised for menu items that fill the entire screen. Arrows at the upper and lower edge of the screen indicate further menu items. The arrow at the right edge of the screen refers to the submenu represented by the current menu item. Due to its huge (graphical) need of space, the BigImageMenu suits as an attractive main menu of an application. The submenus may be realised as MultiImageMenu or TextMenu.

Some images were drawn for the consequtively listed program example VoleBigImageMenuExample, using the JControl/IDE tool PictureEdit. Those are included in the archive VoleBigImageMenuExample.zip along with the program and a JControl/IDE project file. The latter can be opened in your JControl/IDE and tested by using the simulator or your JControl device.

Figure 4: The VoleBigImageMenuExample

1    import jcontrol.ui.vole.Frame;
2    import jcontrol.ui.vole.menu.BigImageMenu;
3    
4    /**
5     * <p>This example demonstrates how to use the
6     * component BigImageMenu within the GUI framework
7     * JControl/Vole.</p>
8     *
9     * <p>(C) DOMOLOGIC Home Automation GmbH 2003-2005</p>
10     */
11    public class VoleBigImageMenuExample extends Frame {
12     
13      /**
14       * Create and show a BigImageMenu
15       */
16      public VoleBigImageMenuExample() {
17    
18        // create a big BigImageMenu
19        BigImageMenu menu = new BigImageMenu(0, 0, 128, 64);
20       
21        // add some menu items
22        menu.addMenuItem("menu1.jcif");
23        menu.addMenuItem("menu2.jcif");
24        menu.addMenuItem("menu3.jcif");
25       
26        // show the menu
27        setMenu(menu);
28        show();
29      }
30    
31      /**
32       * Instantiate the VoleBigImageMenuExample
33       */
34      public static void main(String[] args) {
35        new VoleBigImageMenuExample();
36      }
37    }
Listing 3: VoleBigImageMenuExample.java