?? supportedtypes.java
字號:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.media.*;
/** Displays supported media types for a given protocol */
public class SupportedTypes extends Form implements CommandListener
{
private Command exitCommand;
private Display display;
private VideoPlayer parent;
public SupportedTypes(VideoPlayer parent, String protocol) {
super("Supported media types for " + protocol);
this.parent = parent;
display = Display.getDisplay(parent);
exitCommand = new Command("Back", Command.EXIT, 2);
addCommand(exitCommand);
setCommandListener(this);
String[] types = Manager.getSupportedContentTypes(protocol);
for(int i = 0; i < types.length; i++) {
System.out.println(types[i]);
append(new TextField("http", types[i], 20, TextField.ANY));
}
}
public void commandAction(Command c, Displayable s) {
if(c == exitCommand) {
display.setCurrent(parent.form);
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -