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

📄 songtype.java

📁 mp3播放功能
💻 JAVA
字号:
package Function;

import java.io.File;

import javax.swing.filechooser.FileFilter;

/**
 * The class extends class FileFilter.It
 * is designed to set the format of files
 * that are belong to song types.
 * 
 * @author DuXiaojing
 *
 */
public class SongType extends FileFilter{

	/**
	 * The method set the state of a file to
	 * judge whether the file is a song types
	 * or not.
	 * 
	 * @param pathname
	 * @return Returns the state of a file
	 */
	public boolean accept(File pathname) {
		// TODO Auto-generated method stub
		return pathname.isDirectory() || pathname.getName().endsWith(".mp3");
	}

	/**
	 * 
	 * @return Returns string "song types" 
	 */
	public String getDescription() {
		// TODO Auto-generated method stub
		return "Song types";
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -