bluegammon.gui.menu
Interface MenuPainter

All Known Implementing Classes:
DefaultMenuPainter

public interface MenuPainter

The MenuPainter interface defines high-level methods when drawing contents of a Menu, which consists of MenuPages and PageItems. An implementation of this interface is provided when constructing a Menu.

Author:
Peter Andersson

Method Summary
 void paintMenu(javax.microedition.lcdui.Graphics g, MenuPage menu, int x, int y, int width, int height)
          Paints a static menu.
 void paintTransition(javax.microedition.lcdui.Graphics g, MenuPage fromMenu, MenuPage toMenu, int x, int y, int width, int height, int frame, int frames, boolean back)
          Paints a transition between menus.
 

Method Detail

paintMenu

public void paintMenu(javax.microedition.lcdui.Graphics g,
                      MenuPage menu,
                      int x,
                      int y,
                      int width,
                      int height)
Paints a static menu.

Parameters:
g - The graphics context to draw to.
menu - The menu to draw.
x - Offset x coordinate.
y - Offset y coordinate.
width - The width of the menu.
height - The height of the menu.

paintTransition

public void paintTransition(javax.microedition.lcdui.Graphics g,
                            MenuPage fromMenu,
                            MenuPage toMenu,
                            int x,
                            int y,
                            int width,
                            int height,
                            int frame,
                            int frames,
                            boolean back)
Paints a transition between menus.

Parameters:
g - The graphics context to draw to.
fromMenu - Source menu.
toMenu - Destination menu.
x - Offset x coordinate.
y - Offset y coordinate.
width - The width of the menu.
height - The height of the menu.
frame - Current frame (0 - frames).
frames - Maximum frames in this transition.
back - True if going back to a page, false otherwise.