How to use freely resizable font in in Java ME(5)
来源:未知 责任编辑:责任编辑 发表时间:2013-12-18 11:34 点击:次
return pressed;
}
public void commandAction(Command c, Displayable d) {
if (c == exitCommand) {
midlet.notifyDestroyed();
}
}
class Button {
private int x=0;
private int y=0;
private int w=0;
private int h=0;
private int size=0;
private String text="";
protected boolean selected = false;
protected Button(int h, int size, String text) {
this.h = h;
this.size = size;
this.text = text;
}
public void registerFeedbackArea(Canvas canvas, int id) {
if (touchFeedback) {
try {
tactileFeedback.registerFeedbackArea(canvas, id, x, y, w, h,
TactileFeedback.FEEDBACK_STYLE_BASIC);
}
catch (IllegalArgumentException iae) {
System.out.println("IllegalArgumentException: " + iae.getMessage());
}
}
}
public int drawButton(Graphics g, int x, int y, boolean selected) {
this.x = x;
this.y = y;
font = DirectUtils.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, size);
相关新闻>>
- 发表评论
-
- 最新评论 更多>>