您現在的位置: 18luck新利全站下载 >> 新利体育取现 >> 廣告傳媒>> 資料信息

中國銀行多媒體會議係統設計方案(doc 9頁)

所屬分類:
廣告傳媒
文件大小:
4075 KB
下載地址:
相關資料:
中國銀行, 多媒體會議, 會議係統, 係統設計, 設計方案
中國銀行多媒體會議係統設計方案(doc 9頁)內容簡介

中國銀行多媒體會議係統設計方案內容提要:
//次事件表明用戶選擇了"播放"菜單命令;
//如果當前有一個文件可以播放則執行播放命令;
if (e.getActionCommand().equals("停止")) {
if (player != null) {
player.stop();
player.setMediaTime(new Time(0));
}
return;
}
//用戶選擇要播放的媒體文件
if (e.getActionCommand().equals("打開")) {
FileDialog fd = new FileDialog(this, "打開媒體文件", FileDialog.LOAD);
fd.setDirectory(currentDirectory);
fd.show();
// 如果用戶放棄選擇文件,則返回
if (fd.getFile() == null)
return;
//保存了所選文件的名稱及其全路徑名稱已被稍後使用
//同時設置當前文件夾路徑
selcectfile = fd.getFile();
currentDirectory = fd.getDirectory();
cufile = currentDirectory + selcectfile;
//將用戶選擇的文件作為一個菜單項加入播放列表該菜單項"名為"該文件名;
//被點擊後給出的命令串是該文件的全路徑名
MenuItem mi = new MenuItem(selcectfile);
mi.setActionCommand(cufile);
MenuBar mb = getMenuBar();
Menu m = mb.getMenu(2);
mi.addActionListener(this);
m.add(mi);

} else {
//程序邏輯運行到此表示用戶選擇了一個"播放列表"中的媒體文件
//此時可以通過如下動作獲得該文件的全路徑名;
cufile = e.getActionCommand();
selcectfile = cufile;
}
//如果已存在一個播放器,則先將其關閉,稍後重新創建
//創建播放器時需要捕捉一些異常;
if (player != null)
player.close();
try {
player = Manager.createPlayer(new MediaLocator("file:" + cufile));
} catch (java.io.IOException e2) {
System.out.println(e2);
return;
} catch (NoPlayerException e2) {
System.out.println("不能找到播放器.");
return;
}
if (player == null) {
System.out.println("無法創建播放器.");
return;


..............................

Baidu
map