/** * * 自从国庆的时候装上了Linux的时候就想写一个MP3播放器 * 主要是因为当时刚学Linux,有很多东西都不知道怎么用, * 也不知道怎么去下载Linux下的播放器,所以就想着写一个 * MP3播放器出来,由于本人很喜欢听歌,免得到了Linux系统 * 写就听不了音乐了,加上最近找工作都没有什么进展,搞得 * 自己很没有信心,自从丰特的面试出来了以后,发现名单上面 * 并没有自己,当时真的觉得很失落,于是安下心来想想自己的问题, * 当时觉得是不是因为自己的水平真的太差了啊!没有一个公司要我, * 然后从17号开始就想再次静下心来学习自己不懂的东西,现在发现 * 自己不懂的知识真的太多了,还需要不断努力,现在对找工作基本上 * 是没有什么信心了 ,或许真的要等到下学期了~~~~~~~~~~~~~~~~~~ * */ /** * * Made by : ff * Q Q : 394447974 * E_Mail : programfan@yeah.net * Blog : http://hexun.com/fangfangff * CUIT技术: http://tech.cuit.edu.cn * date : 2008-11-22 15 : 35 : 48 * IDE : Eclipse3.2 + JDK1.6.0.6 */ package mp3x; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.List; import java.awt.Rectangle; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.io.File; import java.util.HashMap; import java.util.Random; import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JDialog; import javax.swing.JFileChooser; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JSlider; import javax.swing.JTextField; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javazoom.jlgui.basicplayer.BasicPlayerEvent; import mp3x.ctl.PlayerControl; import mp3x.ctl.Mp3TVShow; import mp3x.drag.WindowDragControl; import mp3x.tool.CutAndMerge; import mp3x.tool.ScrollThread; import mp3x.vo.MP3FileFilter; import mp3x.vo.Mp3Enum; import mp3x.vo.SongVO; public class Mp3Player extends JFrame { private JPanel contentPanel = null; private JSlider volumnSlider = null; private JCheckBox muteCheckBox = null; private JPanel headPanel = null; private JLabel nameLabel = null; private JLabel playLabel = null; private JLabel totalTimeLabel = null; private JPanel visualPanel = null; private JSlider processSlider = null; private JButton playlistButton = null; private JButton stopButton = null; private JButton playButton = null; private JButton previousButton = null; private JButton nextButton = null; private JButton cutButton = null; private JButton mergeButton = null; private JButton aboutButton = null; private JFrame playListFrame = null; private JPanel jContentPane = null; private List playList = null; private JButton addButton = null; private JButton removeButton = null; private JButton exitButton = null; private JFrame cutFrame = null; private JPanel jContentPane1 = null; private JFrame mergeFrame = null; private JPanel jContentPane2 = null; private HashMap songMap = new HashMap(); private Mp3TVShow mp3TVShow = new Mp3TVShow(); private PlayerCTL playerCTL = new PlayerCTL(); private boolean progressSliderDrag = false; private int plstate = Mp3Enum.PLSTATE_HIDE; private int playBtnState = Mp3Enum.INIT; private int cutFrameState = Mp3Enum.CUTFRAME_HIDE; private int mergeFrameState = Mp3Enum.MERGEFRAME_HIDE; private JSlider startSlider = null; private JSlider endSlider = null; private JLabel jLabel = null; private JLabel jLabel1 = null; private JTextField cutFilePath = null; private JButton cutPathButton = null; private JButton cutExecButton = null; private JButton addMergeButton = null; private JButton removeMergeButton = null; private List mergeList = null; private JTextField mergedFilePath = null; private JButton mergePathButton = null; private JButton mergeExecButton = null; private JDialog warningDialog = null; private JPanel jContentPane3 = null; private JLabel jLabel2 = null; private JButton sureButton = null; private ScrollThread scrollThread = null; private WindowDragControl windowDragControl = new WindowDragControl(this); private JCheckBox circleCheckBox = null; private JCheckBox shuffleCheckBox = null; ................. ,或许真的要等到下学期了~~~~~~~~~~~~~~~~~~ * */ /** * * Made by : ff * Q Q : 394447974 * E_Mail : programfan@yeah.net * Blog : http://hexun.com/fangfangff * CUIT技术: http://tech.cuit.edu.cn * date : 2008-11-22 15 : 35 : 48 * IDE : Eclipse3.2 + JDK1.6.0.6 */ package mp3x; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.List; import java.awt.Rectangle; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.io.File; import java.util.HashMap; import java.util.Random; import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JDialog; import javax.swing.JFileChooser; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JSlider; import javax.swing.JTextField; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javazoom.jlgui.basicplayer.BasicPlayerEvent; import mp3x.ctl.PlayerControl; import mp3x.ctl.Mp3TVShow; import mp3x.drag.WindowDragControl; import mp3x.tool.CutAndMerge; import mp3x.tool.ScrollThread; import mp3x.vo.MP3FileFilter; import mp3x.vo.Mp3Enum; import mp3x.vo.SongVO; public class Mp3Player extends JFrame { private JPanel contentPanel = null; private JSlider volumnSlider = null; private JCheckBox muteCheckBox = null; private JPanel headPanel = null; private JLabel nameLabel = null; private JLabel playLabel = null; private JLabel totalTimeLabel = null; private JPanel visualPanel = null; private JSlider processSlider = null; private JButton playlistButton = null; private JButton stopButton = null; private JButton playButton = null; private JButton previousButton = null; private JButton nextButton = null; private JButton cutButton = null; private JButton mergeButton = null; private JButton aboutButton = null; private JFrame playListFrame = null; private JPanel jContentPane = null; private List playList = null; private JButton addButton = null; private JButton removeButton = null; private JButton exitButton = null; private JFrame cutFrame = null; private JPanel jContentPane1 = null; private JFrame mergeFrame = null; private JPanel jContentPane2 = null; private HashMap songMap = new HashMap(); private Mp3TVShow mp3TVShow = new Mp3TVShow(); private PlayerCTL playerCTL = new PlayerCTL(); private boolean progressSliderDrag = false; private int plstate = Mp3Enum.PLSTATE_HIDE; private int playBtnState = Mp3Enum.INIT; private int cutFrameState = Mp3Enum.CUTFRAME_HIDE; private int mergeFrameState = Mp3Enum.MERGEFRAME_HIDE; private JSlider startSlider = null; private JSlider endSlider = null; private JLabel jLabel = null; private JLabel jLabel1 = null; private JTextField cutFilePath = null; private JButton cutPathButton = null; private JButton cutExecButton = null; private JButton addMergeButton = null; private JButton removeMergeButton = null; private List mergeList = null; private JTextField mergedFilePath = null; private JButton mergePathButton = null; private JButton mergeExecButton = null; private JDialog warningDialog = null; private JPanel jContentPane3 = null; private JLabel jLabel2 = null; private JButton sureButton = null; private ScrollThread scrollThread = null; private WindowDragControl windowDragControl = new WindowDragControl(this); private JCheckBox circleCheckBox = null; private JCheckBox shuffleCheckBox = null; .................