menupainter.java
来自「手机应用程序之蓝牙编程源代码。。蓝牙编程爱好者课用」· Java 代码 · 共 53 行
JAVA
53 行
// Copyright (c) 2005 Sony Ericsson Mobile Communications AB
//
// This software is provided "AS IS," without a warranty of any kind.
// ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
// INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
// PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
//
// THIS SOFTWARE IS COMPLEMENTARY OF JAYWAY AB (www.jayway.se)
package bluegammon.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 Peter Andersson
*/
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 + =
减小字号Ctrl + -
显示快捷键?