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

📄 playlistrecord.java

📁 mp3的播放
💻 JAVA
字号:
/**************************************************************************
 *	(C) Copyright 2008 by  Tao Liuyuan and Zhang Shuitao.                       *
 *		All Rights Reserved.               								  *
 *     																      *
 *	Project					: KYPlayer									  *
 *	File					: PlayListRecord.java 						  *	
 *	JDK version used        : jdk1.6.0_u4							      *
 * 	Version                 : 1.00				     					  *
 * 	Created				    : 2008.7.6 by we					  *
 *************************************************************************/
package MP3Player;

import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;

/**
 * 用户设定记录类,用于保存播放列表信息.
 * 
 * @author we
 */

public class PlayListRecord implements Serializable {

	/**
	 * 自动生成的序列化属性值
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * 歌曲数目
	 */
	private int i=0;
	
	/**
	 * 选中歌曲的索引值
	 */
	private int currentFileIndex=-1;

	/**
	 * 播放模式
	 */
	private int model=0;

	/**
	 * 歌曲文件列表
	 */
	@SuppressWarnings("unchecked")
	private List file = new ArrayList();
    
	/**
	 * 播放随鼠标光标模式
	 */
	private boolean CursorSelected=false;
	
	/**
	 * 歌曲数目的get方法
	 * @return int
	 */
	public int getMusicCount() {
		return i;
	}

	/**
	 * 歌曲数目的set方法
	 * @param i
	 */
	public void setMusicCount(int i) {
		this.i = i;
	}

	/**
	 * 选中歌曲的索引值的get方法
	 * @return int
	 */
	public int getCurrentFileIndex() {
		return currentFileIndex;
	}

	/**
	 * 选中歌曲的索引值的set方法
	 * @param currentFileIndex
	 */
	public void setCurrentFileIndex(int currentFileIndex) {
		this.currentFileIndex = currentFileIndex;
	}

	/**
	 * 播放模式的get方法
	 * @return int
	 */
	public int getModel() {
		return model;
	}

	/**
	 * 播放模式的set方法
	 * @param model
	 */
	public void setModel(int model) {
		this.model = model;
	}

	/**
	 * 读取原播放列表的所有文件
	 * @return Collection
	 */
	@SuppressWarnings("unchecked")
	public Collection getFile() {

		return file;
	}

	/**
	 * 保存播放列表的所有文件
	 * @param collection
	 */
	@SuppressWarnings("unchecked")
	public void setFile(Collection collection) {
		file.clear();
		Iterator iterator = collection.iterator();
		File musicfile = null;
		while (iterator.hasNext()) {
			musicfile = (File) iterator.next();
			file.add(musicfile);
		}
	}
	
	/**
	 * 播放随鼠标光标模式的get方法
	 * @return boolean
	 */
	public boolean getCursorSelected(){
		return CursorSelected;
	}
    
	/**
	 * 播放随鼠标光标模式的set方法
	 * @param CursorSelected
	 */
	public void setCursorSelected(boolean CursorSelected){
		this.CursorSelected=CursorSelected;
	}
	
}

⌨️ 快捷键说明

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