/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ThreeToFifteen;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
/**
* @author Administrator
*/
public class ThreeToFifteen extends MIDlet implements CommandListener {
private boolean midletPaused = false;
private QipanCanvas qc;
//<editor-fold defaultstate="collapsed" desc=" Generated Fields ">//GEN-BEGIN:|fields|0|
private java.util.Hashtable __previousDisplayables = new java.util.Hashtable();
private List selectList;
private Form helpForm;
private StringItem stringItem;
private Form form;
private StringItem stringItem1;
private Form form1;
private StringItem stringItem2;
private Command exitCommand;
private Command backCommand;
private Command backCommand1;
private Command backCommand2;
private Command screenCommand1;
//</editor-fold>//GEN-END:|fields|0|
/**
* The ThreeToFifteen constructor.
*/
public ThreeToFifteen() {
}
//<editor-fold defaultstate="collapsed" desc=" Generated Methods ">//GEN-BEGIN:|methods|0|
/**
* Switches a display to previous displayable of the current displayable.
* The <code>display</code> instance is obtain from the <code>getDisplay</code> method.
*/
private void switchToPreviousDisplayable() {
Displayable __currentDisplayable = getDisplay().getCurrent();
if (__currentDisplayable != null) {
Displayable __nextDisplayable = (Displayable) __previousDisplayables.get(__currentDisplayable);
if (__nextDisplayable != null) {
switchDisplayable(null, __nextDisplayable);
}
}
}
//</editor-fold>//GEN-END:|methods|0|
//<editor-fold defaultstate="collapsed" desc=" Generated Method: initialize ">//GEN-BEGIN:|0-initialize|0|0-preInitialize
/**
* Initilizes the application.
* It is called only once when the MIDlet is started. The method is called before the <code>startMIDlet</code> method.
*/
private void initialize() {//GEN-END:|0-initialize|0|0-preInitialize
// write pre-initialize user code here
//GEN-LINE:|0-initialize|1|0-postInitialize
// write post-initialize user code here
}//GEN-BEGIN:|0-initialize|2|
//</editor-fold>//GEN-END:|0-initialize|2|
//<editor-fold defaultstate="collapsed" desc=" Generated Method: startMIDlet ">//GEN-BEGIN:|3-startMIDlet|0|3-preAction
/**
* Performs an action assigned to the Mobile Device - MIDlet Started point.
*/
public void startMIDlet() {//GEN-END:|3-startMIDlet|0|3-preAction
// write pre-action user code here
switchDisplayable(null, getSelectList());//GEN-LINE:|3-startMIDlet|1|3-postAction
// write post-action user code he
}//GEN-BEGIN:|3-startMIDlet|2|
//</editor-fold>//GEN-END:|3-startMIDlet|2|
//<editor-fold defaultstate="collapsed" desc=" Generated Method: resumeMIDlet ">//GEN-BEGIN:|4-resumeMIDlet|0|4-preAction
/**
* Performs an action assigned to the Mobile Device - MIDlet Resumed point.
*/
public void resumeMIDlet() {//GEN-END:|4-resumeMIDlet|0|4-preAction
// write pre-action user code here
//GEN-LINE:|4-resumeMIDlet|1|4-postAction
// write post-action user code here
}//GEN-BEGIN:|4-resumeMIDlet|2|
//</editor-fold>//GEN-END:|4-resumeMIDlet|2|
//<editor-fold defaultstate="collapsed" desc=" Generated Method: switchDisplayable ">//GEN-BEGIN:|5-switchDisplayable|0|5-preSwitch
/**
* Switches a current displayable in a display. The <code>display</code> instance is taken from <code>getDisplay</code> method. This method is used by all actions in the design for switching displayable.
* @param alert the Alert which is temporarily set to the display; if <code>null</code>, then <code>nextDisplayable</code> is set immediately
* @param nextDisplayable the Displayable to be set
*/
public void switchDisplayable(Alert alert, Displayable nextDisplayable) {//GEN-END:|5-switchDisplayable|0|5-preSwitch
// write pre-switch user code here
Display display = getDisplay();//GEN-BEGIN:|5-switchDisplayable|1|5-postSwitch
Displayable __currentDisplayable = display.getCurrent();
if (__currentDisplayable != null && nextDisplayable != null) {
__previousDisplayables.put(nextDisplayable, __currentDisplayable);
}
if (alert == null) {
display.setCurrent(nextDisplayable);
} else {
display.setCurrent(alert, nextDisplayable);
}//GEN-END:|5-switchDisplayable|1|5-postSwitch
// write post-switch user code here
}//GEN-BEGIN:|5-switchDisplayable|2|
//</editor-fold>//GEN-END:|5-switchDisplayable|2|
//<editor-fold defaultstate="collapsed" desc=" Generated Method: commandAction for Displayables ">//GEN-BEGIN:|7-commandAction|0|7-preCommandAction
/**
* Called by a system to indicated that a command has been invoked on a particular displayable.
* @param command the Command that was invoked
* @param displayable the Displayable where the command was invoked
*/
public void commandAction(Command command, Displayable displayable) {//GEN-END:|7-commandAction|0|7-preCommandAction
// write pre-action user code here
if (displayable == form) {//GEN-BEGIN:|7-commandAction|1|64-preAction
if (command == backCommand1) {//GEN-END:|7-commandAction|1|64-preAction
// write pre-action user code here
switchDisplayable(null, getSelectList());//GEN-LINE:|7-commandAction|2|64-postAction
// write post-action user code here
}//GEN-BEGIN:|7-commandAction|3|85-preAction
} else if (displayable == form1) {
if (command == backCommand2) {//GEN-END:|7-commandAction|3|85-preAction
// write pre-action user code here
if(this.qc!=null)//GEN-BEGIN:|7-commandAction|4|85-postAction
switchDisplayable(null,this.qc);
else
return;//GEN-END:|7-commandAction|4|85-postAction
this.qc.stop();
// write post-action user code here
} else if (command == exitCommand) {//GEN-LINE:|7-commandAction|5|79-preAction
// write pre-action user code here
exitMIDlet();//GEN-LINE:|7-commandAction|6|79-postAction
// write post-action user code here
} else if (command == screenCommand1) {//GEN-LINE:|7-commandAction|7|81-preAction
// write pre-action user code here
this.qc=new QipanCanvas(false,this);//GEN-BEGIN:|7-commandAction|8|81-postAction
switchDisplayable(null,qc);
//(new Thread(qc)).start();//GEN-END:|7-commandAction|8|81-postAction
// write post-action user code here
}//GEN-BEGIN:|7-commandAction|9|57-preAction
} else if (displayable == helpForm) {
if (command == backCommand) {//GEN-END:|7-commandAction|9|57-preAction
// write pre-action user code here
switchToPreviousDisplayable();//GEN-LINE:|7-commandAction|10|57-postAction
// write post-action user code here
}//GEN-BEGIN:|7-commandAction|11|24-preAction
} else if (displayable == selectList) {
if (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|11|24-preAction
// write pre-action user code here
selectListAction();//GEN-LINE:|7-commandAction|12|24-postAction
// write post-action user code here
} else if (command == exitCommand) {//GEN-LINE:|7-commandAction|13|27-preAction
// write pre-action user code here
exitMIDlet();//GEN-LINE:|7-commandAction|14|27-postAction
// write
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
ThreeToFifteen.rar (51个子文件)
ThreeToFifteen
dist
ThreeToFifteen.jad 262B
ThreeToFifteen.jar 13KB
lib
src
ThreeToFifteen
QipanLayer.java 1KB
QiZhi.java 3KB
Map.java 4KB
ThreeToFifteen.java 21KB
QipanCanvas.java 18KB
ThreeToFifteen.vmd 17KB
p.png 5KB
build
preprocessed
ThreeToFifteen
QipanLayer.java 1KB
QiZhi.java 3KB
Map.java 4KB
ThreeToFifteen.java 21KB
QipanCanvas.java 18KB
p.png 5KB
preverifysrc
b.class 1KB
ThreeToFifteen
ThreeToFifteen.class 5KB
a.class 582B
c.class 5KB
d.class 1KB
obfuscated.jar 12KB
manifest.mf 196B
preverified
b.class 2KB
META-INF
MANIFEST.MF 102B
ThreeToFifteen
ThreeToFifteen.class 6KB
p.png 5KB
a.class 666B
c.class 6KB
d.class 1KB
obfuscated
b.class 1KB
META-INF
MANIFEST.MF 102B
ThreeToFifteen
ThreeToFifteen.class 5KB
p.png 5KB
a.class 582B
c.class 5KB
d.class 1KB
before-obfuscation.jar 16KB
compiled
ThreeToFifteen
QipanCanvas.class 8KB
QipanLayer.class 1021B
ThreeToFifteen.class 7KB
p.png 5KB
QiZhi.class 2KB
Map.class 2KB
.timestamp 9B
build.xml 4KB
nbproject
build-impl.xml 67KB
private
private.xml 388B
private.properties 222B
project.properties 6KB
project.xml 390B
genfiles.properties 455B
共 51 条
- 1
资源评论
- syjmbo2012-09-26本来以为是普通的java程序, 结果貌似是J2ME的,我从来没开发过这种,囧了
- 逆风Hero2011-09-07怎么打开??用什么软件打开哪个文件?
wuding1104
- 粉丝: 0
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功