对话框,替换原SimpleForm的主要工作
来源:技术人生 责任编辑:栏目编辑 发表时间:2013-07-01 10:19 点击:次
import java.io.IOException;
import java.io.Writer;
import java.io.Writer;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.TextField;
import javax.microedition.rms.RecordStoreException;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.TextField;
import javax.microedition.rms.RecordStoreException;
/**
* 对话框,替换原SimpleForm的主要工作
* @author xuh
*
*/
public class DialogBox {
public Menu leftMenu = null; //左按钮
public Menu rightMenu = null; //右按钮
private int dialogState = -1;
private Object obj = null;
public String name = null; //对话框的名字
public String[] text = null; //对话框内显示的内容
private ControlPep controller = null;
private UICanvasBase canvas = null;
public Menu leftMenuLast = null; //保存跳出对话框前的左按钮
public Menu rightMenuLast = null; //保存跳出对话框前的右按钮
private int windowsHeight = (UICanvasBase.smallFontHeight + 2) * 6; //对话框的高度 (这是含标题的高度)
String)obj).lastIndexOf('/')+1, ((String)obj).length());
text = Tools.cutString(font, tmpStrs, textWid);
yesOrNoCommand();
break;
case CONFIRM_RegInfo:
text = Tools.cutString(font, "恭喜注册成功!您的贝多号是" + controller.localEvent.rmsSystem.db3_userjid + "初始密码是" + controller.localEvent.rmsSystem.db4_password + "请妥善保存账号信息。点击确认将自动登录.", textWid);
leftMenu = new Menu("确认",null, null);
rightMenu = new Menu(" ", null, null);
break;
case CONFIRM_UnAuth:
text = Tools.cutString(font, "此贝多号还没有绑定手机,无法登录。请到wap.bedo.cn绑定手机;或其它贝多号登录后到『社区-安全中心-绑定』。", textWid);
leftMenu = new Menu("确认",null, null);
rightMenu = new Menu(" ", null, null);
break;
case CONFIRM_RegErr:
String tmpDes = INFO.EMPTY;
if(controller.regErrorCode.equals("603") &&
tmpDes = controller.regErrorDes;
}
text = Tools.cutString(font, tmpDes, textWid);
leftMenu = new Menu("确认",null, null);
rightMenu = new Menu(" ", null, null);
break;
case ASK_RegErr_SendOrWait:
text = Tools.cutString(font, controller.regErrorDes + "可能由于网络延迟或其他原因注册未成功,请选择重发注册或继续等待。", textWid);
leftMenu = new Menu("重发注册", null, null);
rightMenu = new Menu("继续等待",null,null);
break;
case ASK_SendAuth:
text = Tools.cutString(font, INFO.CONTENT_ASK_sendAuth, textWid);
leftMenu = new Menu("重发",null, null);
rightMenu = new Menu("继续等",null,null);
break;
case ASK_networkContiOrExit:
text = Tools.cutString(font, INFO.CONTENT_ASK_networkContOrSett, textWid);
leftMenu = new Menu("退出&设置", null, null); // -> 0
rightMenu = new Menu("继续使用",null,null); // -> 1
break;
case ASK_fsContiOrExit:
相关新闻>>
- 发表评论
-
- 最新评论 更多>>