org.openbandy.ui
Class MainMenu

java.lang.Object
  extended by javax.microedition.lcdui.Displayable
      extended by javax.microedition.lcdui.Screen
          extended by javax.microedition.lcdui.List
              extended by org.openbandy.ui.MainMenu
All Implemented Interfaces:
javax.microedition.lcdui.Choice, javax.microedition.lcdui.CommandListener

public class MainMenu
extends javax.microedition.lcdui.List
implements javax.microedition.lcdui.CommandListener

This class represents the main menu of an openbandy MIDlet. It holds a hash table of all the main screens that make up an application.

(c) Copyright P. Bolliger 2007, ALL RIGHTS RESERVED.

Version:
1.5
Author:
Philipp Bolliger (philipp@bolliger.name)

Field Summary
static javax.microedition.lcdui.Display display
           
 
Fields inherited from class javax.microedition.lcdui.List
SELECT_COMMAND
 
Fields inherited from interface javax.microedition.lcdui.Choice
EXCLUSIVE, IMPLICIT, MULTIPLE, POPUP, TEXT_WRAP_DEFAULT, TEXT_WRAP_OFF, TEXT_WRAP_ON
 
Constructor Summary
MainMenu(javax.microedition.midlet.MIDlet midlet, javax.microedition.lcdui.Display display)
          Create a main menu screen
 
Method Summary
 void addScreen(BandyDisplayable displayable)
          Add a (BandyDisplayable) screen to the list of main menu entries.
 void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable d)
           
 
Methods inherited from class javax.microedition.lcdui.List
append, delete, deleteAll, getFitPolicy, getFont, getImage, getSelectedFlags, getSelectedIndex, getString, getTicker, insert, isSelected, removeCommand, set, setFitPolicy, setFont, setSelectCommand, setSelectedFlags, setSelectedIndex, setTicker, setTitle, size
 
Methods inherited from class javax.microedition.lcdui.Displayable
addCommand, getHeight, getTitle, getWidth, isShown, setCommandListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

display

public static javax.microedition.lcdui.Display display
Constructor Detail

MainMenu

public MainMenu(javax.microedition.midlet.MIDlet midlet,
                javax.microedition.lcdui.Display display)
Create a main menu screen

Parameters:
midlet - Reference to the current MIDlet instance
display - Reference to the current display instance
Method Detail

addScreen

public void addScreen(BandyDisplayable displayable)
Add a (BandyDisplayable) screen to the list of main menu entries.

Parameters:
displayable - BandyDisplayable screen that should be listed in the main menu

commandAction

public void commandAction(javax.microedition.lcdui.Command c,
                          javax.microedition.lcdui.Displayable d)
Specified by:
commandAction in interface javax.microedition.lcdui.CommandListener