?? button.java
字號:
package org.gggeye.easymf.ui;
public class Button extends View {
/**
* 如果存在form,則提交數據的時候先提交Form
*/
HtmlForm htmlForm;
public Button(String _name, String _action, HtmlForm _htmlForm){
this.action = _action;
this.name = _name==null?"":_name;
this.hasFocus = true;
this.backColor = 0xCCCFFF;
this.fontColor = 0xFFFFFF;
this.htmlForm = _htmlForm;
}
public void doPaint(Pen _point, HtmlDocument _htmlDocument) {
if (_htmlDocument.focusIndex == this.index) {
_point.drawRects(new int[]{0xCEF,0xCEF}, left, top, width, height);
}
_point.save();
_point.setColor(backColor);
_point.fillRect(left + ViewBuilder.LEFT_SPACE, top + ViewBuilder.TOP_SPACE,
width - ViewBuilder.LEFT_SPACE, height-(ViewBuilder.TOP_SPACE));
_point.setFont(font);
_point.setColor(this.fontColor);
int x = left + (ViewBuilder.LEFT_SPACE*2 );
_point.drawString(name, x, top + ViewBuilder.TOP_SPACE , 20);
_point.reset();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -