您现在的位置: 精品资料网 >> 市场营销 >> 广告传媒 >> 资料信息

中国银行多媒体会议系统设计方案(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;


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