📄 confirmui.java
字号:
package AddressBook;
import javax.microedition.lcdui.*;
import javax.microedition.rms.RecordStore;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2008</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class confirmUI implements CommandListener{
private AddressBookMIDlet addressbook;
private Display display;
RecordStore recordStore=null;
public static final int YES=0;
public static final int No=1;
protected Command noCommand;
protected Command yesCommand;
private String yesLabel;
private String noLabel;
public confirmUI(Display display,AddressBookMIDlet addressbook,
String ayesLabel,String anoLabel) {
//display=Display.getDisplay(this);
//String ayesLabel;
//String anoLabel;
this.addressbook=addressbook;
this.yesLabel=(yesLabel==null)?"确定":ayesLabel;
this.noLabel=(noLabel==null)?"返回":anoLabel;
yesCommand=new Command(yesLabel,Command.OK,1);
noCommand=new Command(noLabel,Command.CANCEL,1);
}
public void commandAction(Command c,Displayable d){
Alert alert;
if(c==yesCommand){
try{
alert=new Alert("","确定要删除吗?",null,AlertType.INFO);
}catch(Exception e){
e.printStackTrace();
}
}
if(c==noCommand){
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -