?? formpanel.java
字號:
/********************************************************************
*
* 版權說明,此程序僅供學習參考。不能用于商業
*
********************************************************************/
package org.pook.ui.form;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
import org.pook.Pook;
import org.pook.log.Log;
import org.pook.ui.Part;
import org.pook.ui.core.Platform;
import org.pook.ui.util.GraphicsUtil;
/**
* <b>類名:MenuPanel.java</b> </br> 編寫日期: 2006-9-15 <br/> 程序功能描述?? <br/> Demo:
* <br/> Bug: <br/>
*
* 程序變更日期 ??<br/> 變更作??? ??<br/> 變更說明 ??<br/>
*
* @author wuhua </br> <a href="mailto:rrq12345@163.com">rrq12345@163.com</a>
*/
public class FormPanel extends Panel {
private static Log log = Log.getLog("MenuPanel");
public FormPanel( Image icon ) {
super(icon);
setTimer(Pook.getTimerPart());
}
protected void keyPressed(int keyCode) {
part.onClick(keyCode);
this.softButton.onClick(keyCode);
repaint();
}
public void paint(Graphics g) {
paintIconAndMenuIcon(g);
softButton.paint(g);
part.paint(g);
}
/**
* 繪制??上面的顯??
*/
private void paintIconAndMenuIcon(Graphics g) {
paintTitleIcon(g);
//定要在這里繪制,要不會被覆蓋??
paintTimerImpl(g);
}
private void paintTitleIcon(Graphics g) {
g.setColor(0xFFFFFF);
g.fillRect(0, 0, Platform.WIDTH, 20);
GraphicsUtil.drawImageLeft(g, icon, 0, 0);
g.setColor(0x000000);
g.drawLine(0, 20, Platform.WIDTH, 20);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -