亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? player.java

?? java寫的MP3播放器
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
            if ((playerState == INIT) || (playerState == STOP) || (playerState == OPEN))
            {
				System.gc();
				PlaylistItem pli = null;
				// Local File.
				if (acEject.getMouseButton() == MouseEvent.BUTTON1_MASK)
				{
                	FileDialog FD = new FileDialog(new Frame(),"Open file",FileDialog.LOAD);
                	FD.show();
                	if (FD.getFile() != null) pli = new PlaylistItem(FD.getFile(), FD.getDirectory()+FD.getFile(), -1, true);
				}
				// Remote File.
				else if (acEject.getMouseButton() == MouseEvent.BUTTON3_MASK)
				{
					UrlDialog UD = new UrlDialog("Open location",100,100,280,120,config.getLastURL());
					UD.show();
                	if (UD.getFile() != null) pli = new PlaylistItem(UD.getFile(), UD.getURL(), -1, false);
				}
                this.setCurrentSong(pli);
            }
            offScreenGraphics.drawImage(iconsImage[2], iconsLocation[0], iconsLocation[1], this);
			offScreenGraphics.drawImage(iconsImage[4], iconsLocation[2], iconsLocation[3], this);
            repaint();
        }

        /*---------------------------*/
        /*-- Play the current File --*/
        /*---------------------------*/
        else if (e.getActionCommand().equals("Play"))
        {
            if (playerState == PAUSE)
            {
                theSoundPlayer.resumePlayback();
                playerState = PLAY;
                offScreenGraphics.drawImage(iconsImage[0], iconsLocation[0], iconsLocation[1], this);
                offScreenGraphics.drawImage(iconsImage[3], iconsLocation[2], iconsLocation[3], this);
                repaint();
            }
            else if (playerState == PLAY)
            {
                theSoundPlayer.stopPlayback();
                playerState = PLAY;
				secondsAmount = 0;
                offScreenGraphics.drawImage(timeImage[0], minuteDLocation[0], minuteDLocation[1], this);
                offScreenGraphics.drawImage(timeImage[0], minuteLocation[0], minuteLocation[1], this);
                offScreenGraphics.drawImage(timeImage[0], secondDLocation[0], secondDLocation[1], this);
                offScreenGraphics.drawImage(timeImage[0], secondLocation[0], secondLocation[1], this);
				repaint();
				if (currentFileOrURL != null)
				{
                	try
                	{
						if (currentIsFile == true) theSoundPlayer.setDataSource(openFile(currentFileOrURL));
						else theSoundPlayer.setDataSource(new URL(currentFileOrURL));
					} catch (Exception ex)
					  {
						   trace(0,getClass().getName(),"Cannot read file : "+currentFileOrURL+", "+ex.getMessage());
					  }
                	theSoundPlayer.startPlayback();
				}
            }
            else if ( (playerState == STOP) || (playerState == OPEN))
            {
            	if (currentFileOrURL != null)
            	{
            		try
                	{
						if (currentIsFile == true) theSoundPlayer.setDataSource(openFile(currentFileOrURL));
						else theSoundPlayer.setDataSource(new URL(currentFileOrURL));
					} catch (UnsupportedAudioFileException uafe)
					  {
						trace(0,getClass().getName(),"Stream error :"+currentFileOrURL+", "+uafe.getMessage());
					  }
					  catch (LineUnavailableException lue)
					  {
						trace(0,getClass().getName(),"Stream error :"+currentFileOrURL+", "+lue.getMessage());
					  }
					  catch (IOException ex)
					  {
						trace(0,getClass().getName(),"Stream error :"+currentFileOrURL+", "+ex.getMessage());
					  }
                	theSoundPlayer.startPlayback();
                	theSoundPlayer.setGain( ((double)gainValue / (double)maxGain) );
					theSoundPlayer.setPan((float)balanceValue);
                	sampleRateImage = (new taftb(fontIndex, imText, fontWidth, fontHeight, 0, ""+Math.round((theSoundPlayer.getAudioFormat()).getSampleRate()/1000))).getBanner();
                	bitsRateImage = (new taftb(fontIndex, imText, fontWidth, fontHeight, 0, ""+Math.round((theSoundPlayer.getAudioFormat()).getFrameSize()*8*(theSoundPlayer.getAudioFormat()).getFrameRate()/1000))).getBanner();
                	offScreenGraphics.drawImage(sampleRateImage, sampleRateLocation[0], sampleRateLocation[1], this);
                	offScreenGraphics.drawImage(bitsRateImage, bitsRateLocation[0], bitsRateLocation[1], this);
                	if ((theSoundPlayer.getAudioFormat()).getChannels() == 2)
                	{
                	    offScreenGraphics.drawImage(activeModeImage[0], stereoLocation[0], stereoLocation[1], this);
                	}
                	else if ((theSoundPlayer.getAudioFormat()).getChannels() == 1)
                	{
                	    offScreenGraphics.drawImage(activeModeImage[1], monoLocation[0], monoLocation[1], this);
                	}
                	double lenghtInSecond = 0.0;
                	if ((theSoundPlayer.getAudioFileFormat()).getFrameLength() != -1 ) lenghtInSecond = ((theSoundPlayer.getAudioFileFormat()).getFrameLength()*theSoundPlayer.getAudioFormat().getFrameSize()*8)/((theSoundPlayer.getAudioFormat()).getFrameSize()*8*(theSoundPlayer.getAudioFormat()).getFrameRate());
                	else lenghtInSecond = ((theSoundPlayer.getAudioFileFormat()).getByteLength()*8)/((theSoundPlayer.getAudioFormat()).getFrameSize()*8*(theSoundPlayer.getAudioFormat()).getFrameRate());
                	int    minutes = (int) (lenghtInSecond/60);
                	int    seconds = (int) (lenghtInSecond - (minutes*60));
                	titleText = currentSongName.toUpperCase();
                	if (seconds >= 10) titleText = titleText + " ("+minutes+":"+seconds+")";
                	else titleText = titleText + " ("+minutes+":0"+seconds+")";
                	titleImage = (new taftb(fontIndex, imText, fontWidth, fontHeight, 0, titleText)).getBanner(0,0,155,6);
                	offScreenGraphics.drawImage(clearImage, titleLocation[0], titleLocation[1], this);
                	offScreenGraphics.drawImage(titleImage, titleLocation[0], titleLocation[1], this);
                	offScreenGraphics.drawImage(timeImage[0], minuteDLocation[0], minuteDLocation[1], this);
                	offScreenGraphics.drawImage(timeImage[0], minuteLocation[0], minuteLocation[1], this);
                	offScreenGraphics.drawImage(timeImage[0], secondDLocation[0], secondDLocation[1], this);
                	offScreenGraphics.drawImage(timeImage[0], secondLocation[0], secondLocation[1], this);

                	playerState = PLAY;
                	offScreenGraphics.drawImage(iconsImage[0], iconsLocation[0], iconsLocation[1], this);
                	offScreenGraphics.drawImage(iconsImage[3], iconsLocation[2], iconsLocation[3], this);
                	repaint();

                	trace(1,getClass().getName(),titleText);
                	if ((theSoundPlayer.getAudioFileFormat()).getFrameLength() != -1 ) trace(1,getClass().getName(),"Frames = "+(theSoundPlayer.getAudioFileFormat()).getFrameLength());
                	trace(1,getClass().getName(),"FrameRate (Hz) = "+theSoundPlayer.getAudioFormat().getFrameRate());
                	trace(1,getClass().getName(),"FrameSize (bits) = "+theSoundPlayer.getAudioFormat().getFrameSize()*8);
				}
            }
        }

        /*-----------------------------------*/
        /*-- Pause/Resume the current File --*/
        /*-----------------------------------*/
        else if (e.getActionCommand().equals("Pause"))
        {
            if (playerState == PLAY)
            {
                theSoundPlayer.pausePlayback();
                playerState = PAUSE;
                offScreenGraphics.drawImage(iconsImage[1], iconsLocation[0], iconsLocation[1], this);
				offScreenGraphics.drawImage(iconsImage[4], iconsLocation[2], iconsLocation[3], this);
                repaint();
            }
            else if (playerState == PAUSE)
            {
                theSoundPlayer.resumePlayback();
                playerState = PLAY;
                offScreenGraphics.drawImage(iconsImage[0], iconsLocation[0], iconsLocation[1], this);
                offScreenGraphics.drawImage(iconsImage[3], iconsLocation[2], iconsLocation[3], this);
                repaint();
            }
        }

        /*------------------*/
        /*-- Stop to play --*/
        /*------------------*/
        else if (e.getActionCommand().equals("Stop"))
        {
            if ( (playerState == PAUSE) || (playerState == PLAY))
            {
                theSoundPlayer.stopPlayback();
                playerState = STOP;
                secondsAmount = 0;
                acPosBar.setLocation(posBarBounds[0],posBarLocation[1]);
                offScreenGraphics.drawImage(iconsImage[2], iconsLocation[0], iconsLocation[1], this);
				offScreenGraphics.drawImage(iconsImage[4], iconsLocation[2], iconsLocation[3], this);
                repaint();
            }
        }

        /*----------*/
        /*-- Next --*/
        /*----------*/
        else if (e.getActionCommand().equals("Next"))
        {
           	// Try to get next song from the playlist
           	playlist.nextCursor();
           	PlaylistItem pli = playlist.getCursor();
			this.setCurrentSong(pli);
        }

        /*--------------*/
        /*-- Previous --*/
        /*--------------*/
        else if (e.getActionCommand().equals("Previous"))
        {
           	// Try to get previous song from the playlist
           	playlist.previousCursor();
           	PlaylistItem pli = playlist.getCursor();
			this.setCurrentSong(pli);
        }

        /*--------------------------------------------*/
        /*--     Exit window through Exit Button    --*/
        /*--------------------------------------------*/
        else if (e.getActionCommand().equals("Exit"))
        {
            if ( (playerState == PAUSE) || (playerState == PLAY))
            {
			 	theSoundPlayer.stopPlayback();
			}
            dispose();
            System.gc();
            System.exit(0);
        }
        /*--------------------------------------------*/
        /*-- Move full window through its Title Bar --*/
        /*--------------------------------------------*/
        else if (e.getActionCommand().equals("TitleBar"))
        {
            //trace(3,getClass().getName(),"X="+acTitle.getMouseX()+" Y="+acTitle.getMouseY());
            if (acTitleBar.isMousePressed() == false) FirstDrag = true;
            else
            {
        		int DeltaX = 0;
    	    	int DeltaY = 0;
	        	if (FirstDrag == false)
	        	{
	    	    	DeltaX = acTitleBar.getMouseX() - XDrag;
	    		    DeltaY = acTitleBar.getMouseY() - YDrag;
	    		    XDrag = acTitleBar.getMouseX() - DeltaX;
	    	        YDrag = acTitleBar.getMouseY() - DeltaY;
	    		    OrigineX = OrigineX + DeltaX;
		    	    OrigineY = OrigineY + DeltaY;
		    	    setLocation(OrigineX,OrigineY);
		        }
    		    else
	    	    {
		        	FirstDrag = false;
		        	XDrag = acTitleBar.getMouseX();
    		        YDrag = acTitleBar.getMouseY();
	    	    }
	    	}
        }
        else
        {

        }
    }


    public void paint(Graphics g)
    {
		if (offScreenImage != null)
        {
 	  		g.drawImage(offScreenImage, 0, 0, this);
        }
    }

	public void update(Graphics g)
	{
		//System.out.println("Update");
		paint(g);
    }

	/*-- Invoked when the mouse has been clicked on a component --*/
	//public void mouseClicked(MouseEvent me)
	//{}

	/*-- Invoked when the mouse enters a component --*/
	//public void mouseEntered(MouseEvent me)
	//{}

	/*-- Invoked when the mouse exits a component --*/
	//public void mouseExited(MouseEvent me)
	//{}

	/*-- Invoked when a mouse button has been pressed on a component --*/
 	//public void mousePressed(MouseEvent me)
	//{}

	/*-- Invoked when a mouse button has been released on a component --*/
 	//public void mouseReleased(MouseEvent me)
	//{}

	//public void mouseDragged(MouseEvent me)
	//{}

	//public void mouseMoved(MouseEvent me)
	//{}

    private File openFile(String file)
    {
		return new File(file);
	}

    public void setSkin(String sk)
    {
        thePath=sk;
    }

	/**
	 * Sends traces to Debug.
	 */
	private void trace(int level, String msg1, String msg2)
	{
		Debug dbg = Debug.getInstance();
		dbg.log(level,msg1+":"+msg2);
	}

	/**
	 * Entry point.
	 */
	public static void main(String[] args)
	{
        Player theGUI;
        String currentArg = null;
        String currentValue = null;
		String skin = null;
		String logfile = null;
		int loglevel = 0;
        for (int i=0;i<args.length;i++)
        {
			currentArg = args[i];
			if (currentArg.startsWith("-"))
			{
				if (currentArg.toLowerCase().equals("-skin"))
				{
					i++;
					if (i >= args.length) usage("skin value missing");
					currentValue = args[i];
					skin = currentValue.replace('\\', '/').replace('/',java.io.File.separatorChar);
				}
				else if (currentArg.toLowerCase().equals("-loglevel"))
				{
					i++;
					if (i >= args.length) usage("loglevel value missing");
					currentValue = args[i];
					try
					{
						loglevel = Integer.parseInt(currentValue);
					} catch (NumberFormatException nfe)
					  {
						  usage("Invalid number : "+nfe.getMessage());
					  }
				}
				else if (currentArg.toLowerCase().equals("-logfile"))
				{
					i++;
					if (i >= args.length) usage("logfile value missing");
					currentValue = args[i];
					logfile = currentValue.replace('\\', '/').replace('/',java.io.File.separatorChar);
				}
				else usage("Unknown parameter : "+currentArg);
			}
			else
			{
				usage("Invalid parameter :"+currentArg);
			}
		}
        theGUI= new Player(skin, loglevel, logfile);
		theGUI.show();
	}

	/**
	 * Displays usage.
	 */
	private static void usage(String msg)
	{
		System.out.println("jlGui 2.0 : "+msg);
		System.out.println("");
		System.out.println("jlGui 2.0 : Usage");
		System.out.println("            java javazoom.jlGui.Player [-skin skinFilename] [-loglevel number] [-logfile logFilename]");
		System.out.println("");
		System.out.println("            skinFilename : Filename to a Winamp Skin2.x");
		System.out.println("            number       : Level of traces (0,1,2)");
		System.out.println("            logFilename  : Filename for traces");
		System.out.println("");
		System.out.println("Homepage  : http://www.javazoom.net");
		System.exit(0);
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久久电影| 高清视频一区二区| 国产凹凸在线观看一区二区| 在线观看国产91| 国产精品网站在线观看| 免费在线看一区| 91国偷自产一区二区使用方法| 精品精品欲导航| 亚洲在线观看免费| 99re这里都是精品| 久久精品欧美一区二区三区麻豆 | 成人永久免费视频| 日韩欧美精品在线视频| 偷拍亚洲欧洲综合| 在线国产电影不卡| 一区二区免费视频| 99久久精品国产网站| 久久久精品一品道一区| 韩国视频一区二区| 91精品国产综合久久福利软件| 亚洲精品ww久久久久久p站| 成人黄色a**站在线观看| 亚洲精品一线二线三线| 久久国产麻豆精品| 欧美一区二区黄| 麻豆精品一区二区综合av| 91精品国产综合久久精品麻豆| 亚洲一区二区高清| 欧美性做爰猛烈叫床潮| 亚洲在线一区二区三区| 欧美影视一区在线| 亚洲线精品一区二区三区| 91高清视频在线| 亚洲精品久久久久久国产精华液| 99视频在线观看一区三区| 欧美极品aⅴ影院| 成人av电影观看| 亚洲日本在线a| 欧美性大战久久久久久久| 亚洲国产综合色| 91麻豆精品国产综合久久久久久| 天堂在线亚洲视频| 日韩精品一区二区三区三区免费| 精品一区二区三区久久久| 欧美α欧美αv大片| 国产成人一区在线| 国产精品国产三级国产专播品爱网 | 国产精品美女久久久久久久久| 成人少妇影院yyyy| 1000精品久久久久久久久| 在线观看欧美日本| 日韩制服丝袜av| 久久免费午夜影院| 91视频你懂的| 亚洲成人免费视频| 欧美一级理论片| 欧美天堂亚洲电影院在线播放 | 日本一区二区免费在线观看视频| 韩国精品一区二区| 国产午夜精品理论片a级大结局| 风间由美一区二区av101 | 制服丝袜亚洲网站| 韩国午夜理伦三级不卡影院| 中文字幕在线观看一区二区| 欧美亚洲综合色| 精品一区二区影视| 亚洲天堂免费在线观看视频| 91麻豆精品国产自产在线| 国产精品一二一区| 亚洲最大色网站| 久久久亚洲欧洲日产国码αv| 99精品视频在线免费观看| 天天综合天天做天天综合| 国产欧美一区二区精品性| 欧美中文字幕一区| 国产99久久精品| 日韩二区三区四区| 中文字幕亚洲一区二区av在线| 337p亚洲精品色噜噜| eeuss鲁片一区二区三区在线看| 日韩一区欧美二区| 亚洲色图第一区| 精品三级在线看| 欧美日韩精品免费观看视频| 国产成人免费视| 日韩和欧美的一区| 亚洲男人天堂av| 国产夜色精品一区二区av| 欧美酷刑日本凌虐凌虐| 91小视频在线| 高清成人免费视频| 久久国产欧美日韩精品| 午夜电影久久久| 亚洲免费色视频| 国产精品水嫩水嫩| 久久蜜桃一区二区| 精品久久人人做人人爽| 91麻豆精品国产91久久久| 色综合久久久久综合体桃花网| 国产精品1区2区3区| 精品一区二区精品| 美日韩一区二区| 日本视频免费一区| 日本欧美韩国一区三区| 亚洲va天堂va国产va久| 亚洲精品美腿丝袜| 国产一区欧美二区| 人人精品人人爱| 蜜臀国产一区二区三区在线播放| 亚洲电影视频在线| 亚洲国产va精品久久久不卡综合| 亚洲欧美日本韩国| 自拍偷拍亚洲激情| 亚洲欧美韩国综合色| 亚洲色图色小说| 一区二区三区四区激情| 一区二区免费在线播放| 亚洲最新视频在线观看| 亚洲成a人v欧美综合天堂| 亚洲成人免费视| 秋霞午夜鲁丝一区二区老狼| 另类小说视频一区二区| 国产在线播放一区二区三区| 国产大陆亚洲精品国产| gogogo免费视频观看亚洲一| 色综合色狠狠综合色| 91在线国产观看| 欧美手机在线视频| 日韩精品一区二区三区在线播放 | 日韩精品一二三四| 日本午夜一区二区| 激情欧美一区二区三区在线观看| 国产黄色精品视频| 91污在线观看| 欧美私人免费视频| 一区二区在线观看免费视频播放| 亚洲精品午夜久久久| 亚洲 欧美综合在线网络| 久久成人羞羞网站| 成人黄页毛片网站| 欧美视频中文字幕| 精品久久免费看| 亚洲人成7777| 日韩 欧美一区二区三区| 国内精品嫩模私拍在线| caoporn国产精品| 欧美日韩激情一区二区三区| 久久男人中文字幕资源站| 国产精品国产三级国产a| 亚洲电影中文字幕在线观看| 国产麻豆精品久久一二三| 在线视频一区二区三| 日韩美一区二区三区| 中文字幕一区二区三区视频 | 亚洲女厕所小便bbb| 日本色综合中文字幕| www..com久久爱| 欧美高清dvd| 国产精品免费av| 免费成人小视频| 99久久久国产精品| 日韩欧美国产三级| 亚洲少妇30p| 国产尤物一区二区| 欧美电影在线免费观看| 国产精品久久久久久久岛一牛影视 | 天堂一区二区在线| aaa欧美色吧激情视频| 日韩一二三四区| 一区二区在线观看视频| 国产91色综合久久免费分享| 欧美久久久一区| 亚洲女性喷水在线观看一区| 国产高清亚洲一区| 精品久久一区二区| 三级成人在线视频| 欧美三级资源在线| 亚洲图片激情小说| 成人爱爱电影网址| 精品噜噜噜噜久久久久久久久试看| 一区二区三区欧美激情| 粉嫩高潮美女一区二区三区| 欧美mv日韩mv国产网站app| 亚洲mv大片欧洲mv大片精品| 91蝌蚪porny| 国产精品美女久久久久久久| 国产精品88888| 欧美v国产在线一区二区三区| 日韩电影免费在线| 9191久久久久久久久久久| 亚洲永久精品大片| 色综合欧美在线视频区| 亚洲免费观看在线视频| 91蜜桃婷婷狠狠久久综合9色| 国产网红主播福利一区二区| 韩国成人在线视频| 久久综合一区二区| 国产成人免费高清| 国产精品久久三区| 91亚洲国产成人精品一区二三|