📄 mbssubform.java
字号:
package mobisutra;
import mobisutra.*;
import javax.microedition.lcdui.*;
public class MbsSubForm
implements CommandListener
{
public MbsSubForm()
{
nextForm = null;
thisForm = null;
position = null;
thisForm = new List("子窗口", 3);
Command command = new Command("后退", 1, 0);
thisForm.addCommand(command);
thisForm.setCommandListener(this);
}
public void show(Displayable displayable, int i)
{
position = MbsLists.position[i];
nextForm = displayable;
thisForm.setTitle(position.name);
for(; thisForm.size() > 0; thisForm.delete(0));
for(int k = 0; k < position.posIndex.length; k++)
{
int j = position.posIndex[k];
thisForm.append(MbsLists.getPositionName(j), null);
}
MbsGlobals.display.setCurrent(thisForm);
}
private void showPic()
{
int i = thisForm.getSelectedIndex();
if(position.posIndex[i] > 0)
MbsGlobals.picCanvas.show(thisForm, position.posIndex[i]);
}
public void commandAction(Command command, Displayable displayable)
{
String s = command.getLabel();
if(command == List.SELECT_COMMAND)
showPic();
else
if(s == "后退")
MbsGlobals.display.setCurrent(nextForm);
}
Displayable nextForm;
List thisForm;
MbsPosition position;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -