supportedtypes.java

来自「手机视频播放软件」· Java 代码 · 共 39 行

JAVA
39
字号
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 + =
减小字号Ctrl + -
显示快捷键?