⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 supportedtypes.java

📁 j2me视频播放小程序的源代码
💻 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++) {
			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 + -