📄 locationairportchoose.java
字号:
// J2ME Compass
// Copyright (C) 2007 Dana Peters
// http://www.qcontinuum.org/compass
package org.qcontinuum.compass;
import javax.microedition.lcdui.*;
public class LocationAirportChoose extends List implements CommandListener {
private Displayable mParent;
private Command mCancelCommand, mOkCommand;
private Location mLocation;
public LocationAirportChoose(Displayable parent, Location location, String[] airports) {
super("Search Airport", List.IMPLICIT, airports, null);
mParent = parent;
mLocation = location;
addCommand(mOkCommand = new Command("OK", Command.OK, 0));
addCommand(mCancelCommand = new Command("Cancel", Command.CANCEL, 0));
setCommandListener(this) ;
}
public void commandAction(Command c, Displayable d) {
if (c == mOkCommand) {
String airportCode = this.getString(this.getSelectedIndex());
Compass.display(new LocationAirportSearch(mParent, mLocation, airportCode));
} else if (c == mCancelCommand) {
Compass.display(mParent);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -