📄 menupainter.java
字号:
package myGame.gui.menu;
import javax.microedition.lcdui.Graphics;
/**
* The <code>MenuPainter</code> interface defines high-level methods when
* drawing contents of a <code>Menu</code>, which consists of
* <code>MenuPage</code>s and <code>PageItem</code>s. An implementation of
* this interface is provided when constructing a <code>Menu</code>.
*
* @author YuBingxing
*/
public interface MenuPainter {
/**
* Paints a static menu.
*
* @param g
* The graphics context to draw to.
* @param menu
* The menu to draw.
* @param x
* Offset x coordinate.
* @param y
* Offset y coordinate.
* @param width
* The width of the menu.
* @param height
* The height of the menu.
*/
public void paintMenu(Graphics g, MenuPage menu, int x, int y, int width,
int height);
/**
* Paints a transition between menus.
*
* @param g
* The graphics context to draw to.
* @param fromMenu
* Source menu.
* @param toMenu
* Destination menu.
* @param x
* Offset x coordinate.
* @param y
* Offset y coordinate.
* @param width
* The width of the menu.
* @param height
* The height of the menu.
* @param frame
* Current frame (0 - frames).
* @param frames
* Maximum frames in this transition.
* @param back
* True if going back to a page, false otherwise.
*/
public void paintTransition(Graphics g, MenuPage fromMenu, MenuPage toMenu,
int x, int y, int width, int height, int frame, int frames,
boolean back);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -