📄 pointlist.java
字号:
import javax.microedition.lcdui.*;
class PointList extends List implements CommandListener
{
TripMate main;
Trip trip;
Displayable parent;
PointList(Trip trip, TripMate main, Displayable parent) {
super(trip.description, IMPLICIT);
this.trip = trip;
this.main = main;
this.parent = parent;
for (int i = 0; i < trip.points.length; i++) {
String description = trip.points[i].description;
if (description.length() == 0) {
description = TripMate.directions[trip.points[i].direction];
}
append(description, TripMate.arrows[trip.points[i].direction]);
}
setCommandListener(this);
addCommand(TripMate.BACK_CMD);
Display.getDisplay(main).setCurrent(this);
}
public void commandAction(Command c, Displayable d)
{
if (c == TripMate.BACK_CMD) {
Display.getDisplay(main).setCurrent(parent);
} else {
int i = getSelectedIndex();
if (i >= 0) {
new PointForm(trip, i, main, this);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -