freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

音樂(lè)播放器系統(tǒng)設(shè)計(jì)畢業(yè)論文(編輯修改稿)

2025-07-20 18:44 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 null) { ()。 player = null。 } ()。 ().saveConfig()。 ().savePlayList()。 (0)。 } 播放菜單詳細(xì)設(shè)計(jì)播放菜單主要包括:播放/暫停,停止,音樂(lè)魔方,播放模式,歌詞背景功能: 播放/暫停功能實(shí)現(xiàn) /** * 開(kāi)始播放音樂(lè) */ public static void start() { if (player != null amp。amp。 !noCanPlaySong()) { ().setLevel(() / )。 setSoundState(getSoundState())。 ()。 //進(jìn)度條更新 ()。 ().start()。 ()。 (())。 playerState = 。 (new IconTool(images/).getIcon())。 (images/)。 (())。 int index = (currentSong)。 (index)。 ().LoadLRC()。 ().refresh()。 ().refresh()。 } } /** * 暫停音樂(lè)函數(shù) */ public static void pause() { if (player != null) { ()。 playerState = 。 (new IconTool(images/).getIcon())。 (images/)。 ().refresh()。 } }//在時(shí)間監(jiān)聽(tīng)中判斷是否點(diǎn)擊播放/暫停按鈕,并調(diào)用相應(yīng)方法播放,如果當(dāng)前狀態(tài)為播放就暫停音樂(lè),如果狀態(tài)為暫停或停止就播放音樂(lè)。public void actionPerformed(ActionEvent e) { String action = ()。 if (添加音樂(lè)文件.equals(action)) { ()。 } else if (添加音樂(lè)文件夾.equals(action)) { ()。 } else if (退 出.equals(action)) { if (player != null) { ()。 player = null。 } ()。 ().saveConfig()。 ().savePlayList()。 (0)。 } else if (播放/暫停.equals(action) amp。amp。 () == ) { ()。 } else if (播放/暫停.equals(action) amp。amp。 () == ) { ()。 } else if (播放/暫停.equals(action) amp。amp。 () == ) { (null)。 ()。} 停止功能實(shí)現(xiàn) /** * 停止播放 */ public static void stop() { if (player != null) { playerState = 。 (new IconTool(images/).getIcon())。 (images/)。 ()。 (0)。 (00:00| + (().getSeconds()))。 ()。 ().refresh()。 }}//判斷是否點(diǎn)擊停止菜單,并調(diào)用stop();方法public void actionPerformed(ActionEvent e) { String action = ()。 if (添加音樂(lè)文件.equals(action)) { ()。 } else if ( 停 止 .equals(action)) { ()。 }} 音樂(lè)魔方實(shí)現(xiàn)音樂(lè)魔方只要是主界面的一個(gè)迷你模式,能夠?qū)崿F(xiàn)播放/暫停,快進(jìn)/快退,退出功能如圖:。 /** * 將Image圖像轉(zhuǎn)換為Shape圖形 * * @param img * @param isFiltrate * @return Image圖像的Shape圖形表示 * @author Hexen */ public Shape getImageShape(Image img) { ArrayListInteger x = new ArrayListInteger()。 ArrayListInteger y = new ArrayListInteger()。 int width = (null)。// 圖像寬度 int height = (null)。// 圖像高度 // 篩選像素 // 首先獲取圖像所有的像素信息 PixelGrabber pgr = new PixelGrabber(img, 0, 0, 1, 1, true)。 try { ()。 } catch (InterruptedException ex) { ()。 } int pixels[] = (int[]) ()。 // 循環(huán)像素 for (int i = 0。 i 。 i++) { // 篩選,將不透明的像素的坐標(biāo)加入到坐標(biāo)ArrayList x和y中 int alpha = getAlpha(pixels[i])。 if (alpha == 0) { continue。 } else { (i % width 0 ? i % width 1 : 0)。 (i % width == 0 ? (i == 0 ? 0 : i / width 1) : i / width)。 } } // 建立圖像矩陣并初始化(0為透明,1為不透明) int[][] matrix = new int[height][width]。 for (int i = 0。 i height。 i++) { for (int j = 0。 j width。 j++) { matrix[i][j] = 0。 } } // 導(dǎo)入坐標(biāo)ArrayList中的不透明坐標(biāo)信息 for (int c = 0。 c ()。 c++) { matrix[(c)][(c)] = 1。 } /* * 逐一水平掃描圖像矩陣的每一行,將不透明的像素生成為Rectangle,再將每一行的Rectangle通過(guò)Area類的rec對(duì)象進(jìn)行合并, * 最后形成一個(gè)完整的Shape圖形 */ Area rec = new Area()。 int temp = 0。 for (int i = 0。 i height。 i++) { for (int j = 0。 j width。 j++) { if (matrix[i][j] == 1) { if (temp == 0) temp = j。 else if (j == width) { if (temp == 0) { Rectangle rectemp = new Rectangle(j, i, 1, 1)。 (new Area(rectemp))。 } else { Rectangle rectemp = new Rectangle(temp, i, j temp, 1)。 (new Area(rectemp))。 temp = 0。 } } } else { if (temp != 0) { Rectangle rectemp = new Rectangle(temp, i, j
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1