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

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

?? player.java

?? java寫的MP3播放器
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
        add(acPause);
        acPause.setActionCommand("Pause");
        acPause.addActionListener(this);

        acStop =  new activeComponent(releasedImage[3],pressedImage[3],AWTEvent.MOUSE_EVENT_MASK);
        acStop.setLocation(panelLocation[l++],panelLocation[l++]);
        add(acStop);
        acStop.setActionCommand("Stop");
        acStop.addActionListener(this);

        acNext =  new activeComponent(releasedImage[4],pressedImage[4],AWTEvent.MOUSE_EVENT_MASK);
        acNext.setLocation(panelLocation[l++],panelLocation[l++]);
        add(acNext);
        acNext.setActionCommand("Next");
        acNext.addActionListener(this);

        acEject =  new activeComponent(releasedImage[5],pressedImage[5],AWTEvent.MOUSE_EVENT_MASK | AWTEvent.KEY_EVENT_MASK);
        acEject.setLocation(panelLocation[l++],panelLocation[l++]);
        add(acEject);
        acEject.setActionCommand("Eject");
        acEject.addActionListener(this);
    }

    /**
     * Instantiate Title Panel with activeComponent.
     * Add them to window and ActionListener.
     */
    private void setTitleBarPanel()
    {
        int l = 0;
        acTitleBar = new activeComponent(releasedTitleIm[0],pressedTitleIm[0],AWTEvent.MOUSE_MOTION_EVENT_MASK | AWTEvent.MOUSE_EVENT_MASK);
        acTitleBar.setLocation(titleBarLocation[l++],titleBarLocation[l++]);
        add(acTitleBar);
        acTitleBar.setActionCommand("TitleBar");
        acTitleBar.addActionListener(this);
    }

    /**
     * Instantiate Exit Panel with activeComponent.
     * Add them to window and ActionListener.
     */
    private void setExitPanel()
    {
        int l = 0;
        acExit = new activeComponent(releasedExitIm[0],pressedExitIm[0],AWTEvent.MOUSE_EVENT_MASK);
        acExit.setLocation(exitLocation[l++],exitLocation[l++]);
        add(acExit);
        acExit.setActionCommand("Exit");
        acExit.addActionListener(this);
    }

    /**
     * Instantiate Volume/Balance Panel with activeComponent.
     * Add them to window and ActionListener.
     */
    private void setVolumePanel()
    {
        int l = 0;
        acVolume = new activeComponent(releasedVolumeImage[0],pressedVolumeImage[0],AWTEvent.MOUSE_MOTION_EVENT_MASK | AWTEvent.MOUSE_EVENT_MASK);
        acVolume.setLocation(volumeLocation[l++],volumeLocation[l++]);
        add(acVolume);
        acVolume.setActionCommand("Volume");
        acVolume.addActionListener(this);
        for (int k=0;k<volumeImage.length;k++)
        {
            volumeImage[k] = (new taftb(fakeIndex, imVolume, 68, 13, 2, ""+fakeIndex.charAt(k))).getBanner();
        }
        offScreenGraphics.drawImage(volumeImage[(int)Math.round(((double)gainValue / (double)maxGain)*(volumeImage.length-1))], volumeBarLocation[0], volumeBarLocation[1], this);

		l = 0;
        acBalance = new activeComponent(releasedVolumeImage[0],pressedVolumeImage[0],AWTEvent.MOUSE_MOTION_EVENT_MASK | AWTEvent.MOUSE_EVENT_MASK);
        acBalance.setLocation(balanceLocation[l++],balanceLocation[l++]);
        add(acBalance);
        acBalance.setActionCommand("Balance");
        acBalance.addActionListener(this);
		balanceImage[0] = (new taftb("a", imVolume, deltaBalance+14, 13, 2, "a")).getBanner();
		offScreenGraphics.drawImage(balanceImage[0], balanceBarLocation[0], balanceBarLocation[1], this);

    }

    /**
     * Instantiate PosBar Panel with activeComponent.
     * Add them to window and ActionListener.
     */
    private void setPosBarPanel()
    {
        int l = 0;
        acPosBar = new activeComponent(releasedPosIm[0],pressedPosIm[0],AWTEvent.MOUSE_MOTION_EVENT_MASK | AWTEvent.MOUSE_EVENT_MASK);
        acPosBar.setLocation(posBarLocation[l++],posBarLocation[l++]);
        add(acPosBar);
        acPosBar.setActionCommand("Seek");
        acPosBar.addActionListener(this);
        remove(acPosBar);
    }

	/**
	 * Sets the current song to play and start playing if needed.
	 */
	private void setCurrentSong(PlaylistItem pli)
	{
		int playerStateMem = playerState;
        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);
        }
        playerState = OPEN;
		if (pli != null)
		{
			currentSongName = pli.getName();
			currentFileOrURL = pli.getLocation();
			currentIsFile = pli.isFile();
		}
		else
		{
			currentSongName = TITLETEXT;
			currentFileOrURL = null;
			currentIsFile = false;
		}
		if (currentIsFile == true)
		{
			add(acPosBar);
		}
		else
		{
			config.setLastURL(currentFileOrURL);
			remove(acPosBar);
		}
        titleText = currentSongName.toUpperCase();
        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(sampleRateClearImage, sampleRateLocation[0], sampleRateLocation[1], this);
        offScreenGraphics.drawImage(bitsRateClearImage,bitsRateLocation[0], bitsRateLocation[1], this);
        offScreenGraphics.drawImage(passiveModeImage[0], stereoLocation[0], stereoLocation[1], this);
        offScreenGraphics.drawImage(passiveModeImage[1], monoLocation[0], monoLocation[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);
        repaint();
        // Start playing if needed.
        if ((playerStateMem == PLAY) || (playerStateMem == PAUSE))
        {
			acPlay.fireEvent();
		}
	}

    /*-----------------------------------------*/
    /*--    BasicPlayerListener Interface    --*/
    /*-----------------------------------------*/

	/**
	 * BasicPlayerListener implementation.
	 * It manages "elapsed time" event.
	 */
    public void updateCursor(int secondsAmount, int total)
    {
        /*-- Display elapsed time --*/
        //secondsAmount++;
        int      secondD,second,minuteD,minute;
        int      minutes = (int) (secondsAmount/60);
        int      seconds = (int) (secondsAmount - (minutes*60));
        if (seconds < 10)
        {
            secondD = 0;
            second = seconds;
        }
        else
        {
            secondD = ((int) seconds/10);
            second = ((int) (seconds - (((int) seconds/10))*10));
        }
        if (minutes < 10)
        {
            minuteD = 0;
            minute = minutes;
        }
        else
        {
            minuteD = ((int) minutes/10);
            minute = ((int) (minutes - (((int) minutes/10))*10));
        }
        // Update PosBar location.
        if (total != 0)
        {
			if (FirstPosBarDrag == true)
        	{
        		posBarLocation[0] = ((int) Math.round(secondsAmount*deltaPosBar/total)) + posBarBounds[0];
        		acPosBar.setLocation(posBarLocation[0],posBarLocation[1]);
			}
		}
		else posBarLocation[0] = posBarBounds[0];
        offScreenGraphics.drawImage(timeImage[minuteD], minuteDLocation[0], minuteDLocation[1], this);
        offScreenGraphics.drawImage(timeImage[minute], minuteLocation[0], minuteLocation[1], this);
        offScreenGraphics.drawImage(timeImage[secondD], secondDLocation[0], secondDLocation[1], this);
        offScreenGraphics.drawImage(timeImage[second], secondLocation[0], secondLocation[1], this);
        repaint();
    }

	/**
	 * BasicPlayerListener implementation.
	 * It manages End Of Media event.
	 */
	public void updateMediaState(String state)
	{
        /*-- End Of Media reached --*/
		if (state.equals("EOM"))
		{
	        if ( (playerState == PAUSE) || (playerState == PLAY) )
	        {
	           	playlist.nextCursor();
	           	PlaylistItem pli = playlist.getCursor();
				this.setCurrentSong(pli);
			}
		}
	}


	/**
	 * BasicPlayerListener implementation.
	 */
	public void updateMediaData(byte[] data)
	{
		// Spectrum analyzer could take place here
	}


    /**
     * Manages events.
     */
    public void actionPerformed( ActionEvent e )
    {
        /*------------------------------------*/
        /*--        Interact on Seek        --*/
        /*------------------------------------*/
        if (e.getActionCommand().equals("Seek"))
        {
            if (acPosBar.isMousePressed() == false)
			{
				FirstPosBarDrag = true;
				try
				{
					theSoundPlayer.setSeek(posValue);
				} catch (IOException ioe)
				  {
					  ioe.printStackTrace();
				  }
				repaint();
			}
            else
            {
        		int DeltaX = 0;
	        	if (FirstPosBarDrag == false)
	        	{
	    	    	DeltaX = acPosBar.getMouseX() - XPosBarDrag;
	    		    XPosBarDrag = acPosBar.getMouseX() - DeltaX;
	    		    if (posBarLocation[0]+DeltaX < posBarBounds[0]) posBarLocation[0] = posBarBounds[0];
	    		    else if (posBarLocation[0]+DeltaX  > posBarBounds[1]) posBarLocation[0] = posBarBounds[1];
	    		    else posBarLocation[0] = posBarLocation[0] + DeltaX;
		    	    acPosBar.setLocation(posBarLocation[0],posBarLocation[1]);
                    double a = (maxPos-minPos)/(posBarBounds[1] - posBarBounds[0]);
                    posValue = (a*(posBarLocation[0] - posBarBounds[0]) + minPos);
		        }
    		    else
	    	    {
		        	FirstPosBarDrag = false;
		        	XPosBarDrag = acPosBar.getMouseX();
	    	    }
	    	}
        }

        /*------------------------------------*/
        /*--       Interact on Volume       --*/
        /*------------------------------------*/
        else if (e.getActionCommand().equals("Volume"))
        {
            if (acVolume.isMousePressed() == false)
			{
				FirstVolumeDrag = true;
		        offScreenGraphics.drawImage(clearImage, titleLocation[0], titleLocation[1], this);
	            offScreenGraphics.drawImage(titleImage, titleLocation[0], titleLocation[1], this);
				repaint();
			}
            else
            {
        		int DeltaX = 0;
	        	if (FirstVolumeDrag == false)
	        	{
	    	    	DeltaX = acVolume.getMouseX() - XVolumeDrag;
	    		    XVolumeDrag = acVolume.getMouseX() - DeltaX;
	    		    if (volumeLocation[0]+DeltaX < volumeBounds[0]) volumeLocation[0] = volumeBounds[0];
	    		    else if (volumeLocation[0]+DeltaX  > volumeBounds[1]) volumeLocation[0] = volumeBounds[1];
	    		    else volumeLocation[0] = volumeLocation[0] + DeltaX;
		    	    acVolume.setLocation(volumeLocation[0],volumeLocation[1]);
                    double a = (maxGain-minGain)/(volumeBounds[1] - volumeBounds[0]);
                    gainValue = (int) (a*(volumeLocation[0] - volumeBounds[0]) + minGain);
		    		if (gainValue == 0) theSoundPlayer.setGain( 0 );
			        else theSoundPlayer.setGain(((double)gainValue / (double)maxGain) );
                    String volumeText = "VOLUME: "+(int) Math.round((100/(volumeBounds[1] - volumeBounds[0]))*(volumeLocation[0] - volumeBounds[0]))+"%";
                    Image volImage = (new taftb(fontIndex, imText, fontWidth, fontHeight, 0, volumeText)).getBanner();
                    offScreenGraphics.drawImage(volumeImage[(int)Math.round(((double)gainValue / (double)maxGain)*(volumeImage.length-1))], volumeBarLocation[0], volumeBarLocation[1], this);
                    offScreenGraphics.drawImage(clearImage, titleLocation[0], titleLocation[1], this);
                    offScreenGraphics.drawImage(volImage, titleLocation[0], titleLocation[1], this);
		        }
    		    else
	    	    {
		        	FirstVolumeDrag = false;
		        	XVolumeDrag = acVolume.getMouseX();
	    	    }
	    	}
        }

        /*------------------------------------*/
        /*--       Interact on Balance       --*/
        /*------------------------------------*/
        else if (e.getActionCommand().equals("Balance"))
        {
            if (acBalance.isMousePressed() == false)
			{
				FirstBalanceDrag = true;
				offScreenGraphics.drawImage(clearImage, titleLocation[0], titleLocation[1], this);
             	offScreenGraphics.drawImage(titleImage, titleLocation[0], titleLocation[1], this);
				repaint();
			}
            else
            {
        		int DeltaX = 0;
	        	if (FirstBalanceDrag == false)
	        	{
	    	    	DeltaX = acBalance.getMouseX() - XBalanceDrag;
	    		    XBalanceDrag = acBalance.getMouseX() - DeltaX;
	    		    if (balanceLocation[0]+DeltaX < balanceBounds[0]) balanceLocation[0] = balanceBounds[0];
	    		    else if (balanceLocation[0]+DeltaX  > balanceBounds[1]) balanceLocation[0] = balanceBounds[1];
	    		    else balanceLocation[0] = balanceLocation[0] + DeltaX;
		    	    acBalance.setLocation(balanceLocation[0],balanceLocation[1]);
                    double a = (maxBalance-minBalance)/(balanceBounds[1] - balanceBounds[0]);
                    balanceValue = (a*(balanceLocation[0] - balanceBounds[0]) + minBalance);
		    		theSoundPlayer.setPan((float)balanceValue);
                    String balanceText = "BALANCE: " + (int) Math.abs(balanceValue*100) + "%";
					if (balanceValue > 0) balanceText = balanceText + " RIGHT";
					else if (balanceValue < 0)  balanceText = balanceText + " LEFT";
					else  balanceText = "BALANCE: CENTER";
                    Image balImage = (new taftb(fontIndex, imText, fontWidth, fontHeight, 0, balanceText)).getBanner();
                    offScreenGraphics.drawImage(balanceImage[0], balanceBarLocation[0], balanceBarLocation[1], this);
                    offScreenGraphics.drawImage(clearImage, titleLocation[0], titleLocation[1], this);
                    offScreenGraphics.drawImage(balImage, titleLocation[0], titleLocation[1], this);
		        }
    		    else
	    	    {
		        	FirstBalanceDrag = false;
		        	XBalanceDrag = acBalance.getMouseX();
	    	    }
	    	}
        }

        /*------------------------------------*/
        /*-- Select Filename or URL to load --*/
        /*------------------------------------*/
        else if (e.getActionCommand().equals("Eject"))
        {
            if ((playerState == PLAY) || (playerState == PAUSE))
            {
                theSoundPlayer.stopPlayback();
                playerState = STOP;
            }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三区日韩视频| 亚洲另类在线一区| 亚洲精品国产第一综合99久久| 午夜影院久久久| 91麻豆产精品久久久久久| 日韩免费性生活视频播放| 夜夜精品视频一区二区| 成人黄色在线视频| 亚洲精品一区二区三区香蕉 | 91成人免费在线| 久久精品视频免费| 黄色小说综合网站| 制服视频三区第一页精品| 日韩理论片在线| 国产成人免费在线视频| 欧美成人精品二区三区99精品| 一区二区三区在线免费播放 | 国产欧美一区二区三区在线老狼| 五月激情综合色| 欧美丝袜第三区| 一区二区三区av电影| 99久久国产综合精品麻豆| 中文在线一区二区| 国产电影精品久久禁18| 精品sm在线观看| 国内精品国产成人| 欧美zozo另类异族| 久热成人在线视频| 精品日韩欧美在线| 紧缚奴在线一区二区三区| 欧美成人精精品一区二区频| 久久精品国产亚洲一区二区三区| 91精品国产91久久久久久最新毛片 | 国产精品久久久久四虎| 国产伦精品一区二区三区免费 | 男人的天堂久久精品| 欧美日韩二区三区| 日本亚洲一区二区| 欧美不卡一区二区三区| 久久不见久久见免费视频1| 欧美成人一区二区三区片免费| 欧美bbbbb| 久久久亚洲午夜电影| 成人一级片在线观看| 中文字幕不卡在线播放| 91亚洲午夜精品久久久久久| 亚洲色图20p| 制服丝袜中文字幕一区| 韩国精品一区二区| 中文av一区二区| 色综合久久88色综合天天| 亚洲午夜成aⅴ人片| 欧美精品日韩一区| 国产在线一区观看| 亚洲丝袜制服诱惑| 555www色欧美视频| 国产激情精品久久久第一区二区| 国产精品成人一区二区三区夜夜夜| av电影天堂一区二区在线 | 欧美色综合天天久久综合精品| 午夜a成v人精品| 26uuu久久综合| 97久久精品人人做人人爽 | 老司机午夜精品99久久| 国产精品美女久久久久久| 欧美日韩一二三区| 国产一区二区三区综合| 亚洲精品高清在线| 精品欧美久久久| 95精品视频在线| 麻豆一区二区三区| 亚洲色图视频网| 精品久久人人做人人爰| 在线观看亚洲a| 国产精品一区二区久久不卡| 一区二区久久久| 国产亚洲婷婷免费| 欧美精品亚洲二区| av电影在线观看不卡| 蜜臀av一区二区三区| 亚洲欧美国产77777| 久久无码av三级| 制服丝袜激情欧洲亚洲| 91在线小视频| 国产一区二区不卡| 六月丁香婷婷久久| 亚洲国产精品综合小说图片区| 国产校园另类小说区| 日韩三级在线免费观看| 欧美在线小视频| proumb性欧美在线观看| 激情五月婷婷综合网| 亚洲五月六月丁香激情| 亚洲欧美日韩在线| 中文一区二区完整视频在线观看| 欧美一区二区三区思思人| 91福利在线观看| av福利精品导航| 国产91精品一区二区麻豆网站| 日韩精品91亚洲二区在线观看| 亚洲女厕所小便bbb| 一区在线播放视频| 日本一区二区免费在线观看视频 | 国产午夜精品在线观看| 日韩西西人体444www| 欧美日韩中文一区| 欧美日韩一卡二卡| 欧美日韩mp4| 欧美精品久久99久久在免费线 | 欧美亚洲图片小说| 日本福利一区二区| 色久优优欧美色久优优| 99视频在线精品| 99精品热视频| 91欧美一区二区| 99九九99九九九视频精品| 成人黄色一级视频| 一本到一区二区三区| 在线观看视频一区| 5566中文字幕一区二区电影| 欧美一区中文字幕| 欧美tickle裸体挠脚心vk| 欧美第一区第二区| 国产喂奶挤奶一区二区三区| 日本一区二区三区在线观看| 国产精品萝li| 亚洲综合在线五月| 日韩激情视频在线观看| 寂寞少妇一区二区三区| 高清日韩电视剧大全免费| 成人黄色av电影| 色综合久久综合网| 91精品久久久久久久99蜜桃| 精品国产免费一区二区三区四区| 精品99一区二区| 自拍偷拍亚洲综合| 首页国产丝袜综合| 国产综合久久久久久鬼色| 成人在线视频一区二区| 不卡av电影在线播放| 欧美性生活一区| 欧美va在线播放| 亚洲手机成人高清视频| 天天av天天翘天天综合网| 寂寞少妇一区二区三区| 94色蜜桃网一区二区三区| 欧美久久久久久久久久| 日本一区二区不卡视频| 亚洲国产cao| 国产成人亚洲综合a∨婷婷| 91久久久免费一区二区| 精品欧美黑人一区二区三区| 亚洲免费观看在线视频| 麻豆精品新av中文字幕| 91在线精品一区二区三区| 91精品婷婷国产综合久久竹菊| 国产日产亚洲精品系列| 视频在线观看一区二区三区| 国产盗摄一区二区| 6080亚洲精品一区二区| 国产精品的网站| 久久国产精品免费| 色呦呦网站一区| 久久久久国产成人精品亚洲午夜 | 欧美久久一二区| 国产精品久久久久影院色老大| 天天综合色天天综合色h| 国产精品一卡二卡在线观看| 欧美精选一区二区| 亚洲手机成人高清视频| 国产激情视频一区二区在线观看| 欧美精选在线播放| 一区二区三区在线观看网站| 国产白丝网站精品污在线入口| 3751色影院一区二区三区| 亚洲欧美国产77777| 成人免费观看男女羞羞视频| 日韩欧美一级二级三级久久久| 亚洲一区二区三区四区的| 波多野结衣亚洲| 久久久久久久久久久黄色| 青草国产精品久久久久久| 欧美日韩激情一区二区| 亚洲精品欧美二区三区中文字幕| 国产成人亚洲综合a∨猫咪| 精品久久久久一区二区国产| 日本在线不卡一区| 717成人午夜免费福利电影| 亚洲自拍偷拍欧美| 91国产成人在线| 亚洲最大成人综合| 在线亚洲一区观看| 亚洲综合色自拍一区| 日本国产一区二区| 亚洲综合区在线| 欧美视频在线观看一区| 亚洲国产综合人成综合网站| 色94色欧美sute亚洲线路一久| 自拍偷拍亚洲综合| 色先锋久久av资源部|