visual component中文翻譯,visual component是什么意思,visual component發(fā)音、用法及例句
- 內(nèi)容導(dǎo)航:
- 1、visual component
- 2、如何播放視頻文件 java
1、visual component
visual component發(fā)音
英: 美:
visual component中文意思翻譯
常見釋義:
可視組件
visual component雙語使用場景
1、Function: This visual component will display the XML file name.───功能:這一可視化組件將顯示XML文件名。
2、MCK set KOL-based visual component, use it as convenient as using VCL easy and can achieve the same effect and KOL.───MCK一套以KOL為基礎(chǔ)的可視化組件,用它就像用VCL一樣的方便省事而且可以達(dá)到和KOL一樣的效果。
3、The manipulation processor then raises events, which the application must handle to update the visual component in an appropriate way.───操作處理器然后引發(fā)事件,應(yīng)用程序必須處理這些事件以便以適當(dāng)?shù)姆绞礁驴梢暯M件。
4、This will also place the component in the non-visual component area at the bottom of the WinForms designer.───這也會(huì)將這個(gè)組件放到WinFormsdesigner底部的不可見組件區(qū)域中。
5、In other words, more than one visual component can be bound to a given data object, but each visual component requires its own binder.───換句話說,就是可以將多個(gè)可視化組件綁定到一個(gè)給定的數(shù)據(jù)對象,但每個(gè)可視化組件都需要它自己的binder。
6、Function: This visual component will display the contents of the XML file.───功能:該可視化組件將顯示XML文件的內(nèi)容。
7、To assemble non-visual component classes in the same way that you assemble Windows Forms.───以組合Windows窗體的方式組合非可視組件類。
8、The Visual Editor provides dialog boxes that help you create data objects and data sources that you can use to bind a visual component.───VisualEditor提供的對話框可以幫助您創(chuàng)建數(shù)據(jù)對象和數(shù)據(jù)源,您可以使用它們來綁定可視化組件。
9、I've been given an assignment to create a visual component for a software competition.───我被分配到創(chuàng)建一個(gè)可視化組件軟件的競爭。
visual component相似詞語短語
1、visual field───n.視野; 視界
2、component parts───零部件;元件部分
3、visual studio───可視化工作室
4、visual artist───視覺藝術(shù)家
5、passive component───n.[電子]無源元件
6、visual image───視覺影像;可見圖像,目視圖像
7、visual art───視覺藝術(shù)
8、visual───adj.視覺的,視力的;栩栩如生的
9、component───adj.組成的;構(gòu)成的;n.組成部分;成分;組件,元件
2、如何播放視頻文件 java
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import javax.swing.*;
import javax.media.*;
// 視頻播放程序
public class VideoPlayDemo extends JFrame {
private Player player; // 播放器對象
private Component visualMedia; // 視頻顯示組件
private Component mediaControl; // 視頻播放控制組件
private Container container; // 主容器
private File mediaFile; //媒體文件
private URL fileURL; //媒體文件URL地址
public VideoPlayDemo() { // 構(gòu)造函數(shù)
super("視頻播放程序"); //調(diào)用父類構(gòu)造函數(shù)
container = getContentPane(); //得到窗口容器
JToolBar toobar = new JToolBar(); //實(shí)例化工具欄
JButton openFile = new JButton("打開媒體文件"); //實(shí)例化按鈕
toobar.add(openFile); //增加按鈕到工具欄
JButton openURL = new JButton("打開網(wǎng)絡(luò)地址");
toobar.add(openURL);
container.add(toobar, BorderLayout.NORTH); //設(shè)置工具欄
openFile.addActionListener(new ActionListener() { //打開文件按鈕事件處理
public void actionPerformed(ActionEvent event) {
JFileChooser fileChooser = new JFileChooser(); //實(shí)例化文件選擇器
fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);//設(shè)置文件打開模式為僅打開文件
int result = fileChooser.showOpenDialog(VideoPlayDemo.this);//顯示對話框
if (result == JFileChooser.APPROVE_OPTION) { //得到用戶行為
mediaFile = fileChooser.getSelectedFile(); //得到選擇的文件
}
if (mediaFile != null) {
try {
fileURL = mediaFile.toURL(); //得到文件的URL地址
} catch (MalformedURLException ex) {
ex.printStackTrace(); //輸出錯(cuò)誤信息
showMessage("打開錯(cuò)誤"); //顯示錯(cuò)誤信息
}
startPlayer(fileURL.toString()); //開始播放打開的文件
}
}
});
openURL.addActionListener(new ActionListener() { //打開URL按鈕事件處理
public void actionPerformed(ActionEvent event) {
String addressName =JOptionPane.showInputDialog(VideoPlayDemo.this, "輸入U(xiǎn)RL地址");
if (addressName != null)
startPlayer(addressName); //開始播放打開的URL
}
});
Manager.setHint(Manager.LIGHTWEIGHT_RENDERER, Boolean.TRUE);
setSize(300, 200); //設(shè)置窗口大小
setVisible(true); //設(shè)置窗口為可視
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //關(guān)閉窗口時(shí)退出程序
}
//初始化播放器
public void startPlayer(String mediaLocation) {
if (player != null)
//如果播放器非空則移去先前的播放器組件
if (visualMedia != null)
container.remove(visualMedia); //如果對象visualMedia非空則移去
if (mediaControl != null) {
container.remove(mediaControl); //如果對象mediaControl非空則移去
player.close(); //關(guān)閉播放器
}
MediaLocator mediaLocator = new MediaLocator(mediaLocation); //媒體定位器
if (mediaLocator == null) {
showMessage("打開文件錯(cuò)誤"); //顯示錯(cuò)誤信息
return;
}
try {
player = Manager.createPlayer(mediaLocator); //得到播放器實(shí)例
player.addControllerListener(new PlayerEventHandler()); //增加播放控制器
player.realize();
} catch (Exception ex) {
ex.printStackTrace();
showMessage("打開錯(cuò)誤"); //顯示錯(cuò)誤信息
}
}
//取得媒體組件
public void getMediaComponents() {
visualMedia = player.getVisualComponent(); //取得視頻顯示組件
//如果對象visualMedia非空則加入到窗口內(nèi)容窗格
if (visualMedia != null) {
container.add(visualMedia, BorderLayout.CENTER);
pack();
}
mediaControl = player.getControlPanelComponent(); //取得播放控制組件
//如果對象visualMedia非空則加入到窗口內(nèi)容窗格
if (mediaControl != null)
container.add(mediaControl, BorderLayout.SOUTH);
}
//播放器事件處理
private class PlayerEventHandler extends ControllerAdapter {
public void realizeComplete(RealizeCompleteEvent realizeDoneEvent) {
player.prefetch(); //預(yù)取媒體數(shù)據(jù)
}
//完成預(yù)取媒體數(shù)據(jù)后,開始播放媒體
public void prefetchComplete(PrefetchCompleteEvent prefetchDoneEvent) {
getMediaComponents();
validate();
player.start(); //開始播放媒體
}
//如果媒體播放完畢,重新設(shè)置媒體時(shí)間并停止媒體播放器
public void endOfMedia(EndOfMediaEvent mediaEndEvent) {
player.setMediaTime(new Time(0)); //重新設(shè)置媒體時(shí)間
player.stop(); // 停止媒體播放
}
}
public void showMessage(String s) {
JOptionPane.showMessageDialog(this, s); //顯示提示信息
}
public static void main(String args[]) {
new VideoPlayDemo();
}
}
本站其他內(nèi)容推薦
1、umbel unbeknown haute pantheistic cantina grabble servient trichinosis pro-slavery senesce
2、好萊塢英文(Hollywood中文翻譯,Hollywood是什么意思,Hollywood發(fā)音、用法及例句)
3、stand的意思(stand中文翻譯,stand是什么意思,stand發(fā)音、用法及例句)
4、crew neck中文翻譯,crew neck是什么意思,crew neck發(fā)音、用法及例句
6、aij縮寫是什么意思,aij的全稱及含義,aij全稱意思大全
7、輕重倒置的意思,輕重倒置成語解釋,輕重倒置是什么意思含義寓意
8、搗亂者的英文,英語,troublemaker是什么意思,troublemaker中文翻譯,troublemaker怎么讀、發(fā)音、用法及例句
版權(quán)聲明: 本站僅提供信息存儲(chǔ)空間服務(wù),旨在傳遞更多信息,不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任,不代表本網(wǎng)贊同其觀點(diǎn)和對其真實(shí)性負(fù)責(zé)。如因作品內(nèi)容、版權(quán)和其它問題需要同本網(wǎng)聯(lián)系的,請發(fā)送郵件至 舉報(bào),一經(jīng)查實(shí),本站將立刻刪除。