?? songtype.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 + -