当前位置: 首页>>代码示例>>Java>>正文


Java Player.removeControllerListener方法代码示例

本文整理汇总了Java中javax.media.Player.removeControllerListener方法的典型用法代码示例。如果您正苦于以下问题:Java Player.removeControllerListener方法的具体用法?Java Player.removeControllerListener怎么用?Java Player.removeControllerListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.media.Player的用法示例。


在下文中一共展示了Player.removeControllerListener方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: controllerUpdate

import javax.media.Player; //导入方法依赖的package包/类
/**
 * ControllerListener for the Players.
 */
public synchronized void controllerUpdate(ControllerEvent ce) {

    Player p = (Player) ce.getSourceController();

    if (p == null)
        return;

    // Get this when the internal players are realized.
    if (ce instanceof RealizeCompleteEvent) {
        p.start();
    }

    if (ce instanceof ControllerErrorEvent) {
        p.removeControllerListener(this);
        LOGGER.severe("Receiver internal error: " + ce);
    }

}
 
开发者ID:TTalkIM,项目名称:Smack,代码行数:22,代码来源:AudioReceiver.java

示例2: controllerUpdate

import javax.media.Player; //导入方法依赖的package包/类
/**
 * ControllerListener for the Players.
 */
public synchronized void controllerUpdate(ControllerEvent ce) {

    Player p = (Player) ce.getSourceController();

    if (p == null)
        return;

    // Get this when the internal players are realized.
    if (ce instanceof RealizeCompleteEvent) {
        p.start();
    }

    if (ce instanceof ControllerErrorEvent) {
        p.removeControllerListener(this);
        LOGGER.error("Receiver internal error: " + ce);
    }

}
 
开发者ID:bejayoharen,项目名称:java-bells,代码行数:22,代码来源:AudioReceiver.java

示例3: uninstallPlayer

import javax.media.Player; //导入方法依赖的package包/类
/** In response to TrackModelEvent, remove a Player   
    * 	and its screen from desktop.
    * 
    *  @param tm TrackModel from which Player is being removed.
    * 	@param index Index of Player in TrackList
    *  @see ejmf.toolkit.multiplayer.TrackList
    *  @see ejmf.toolkit.multiplayer.TrackModel
    */
   private void uninstallPlayer(TrackModel tm, int index) {
Player player = tracks.getTrack(index).getPlayer();

if (viewingPanel != null) {
    viewingPanel.removeScreen(player);
    Debug.printObject("uninstallPlayer : after remove screen");
}
  	player.removeControllerListener(this);	
synchronized (this) {
    nActiveTracks--;
}
Debug.printObject("exit uninstallPlayer : " + index);
   }
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:22,代码来源:MultiPlayer.java

示例4: controllerUpdate

import javax.media.Player; //导入方法依赖的package包/类
/**
 * ControllerListener for the Players.
 */
public synchronized void controllerUpdate(ControllerEvent ce) {

    Player p = (Player) ce.getSourceController();

    if (p == null)
        return;

    // Get this when the internal players are realized.
    if (ce instanceof RealizeCompleteEvent) {
        p.start();
        
        Component vc = p.getVisualComponent();
        System.out.println("Start1.1" + vc);
        if ( null != vc )
        {
            System.out.println("### visual component is " + vc);

            JFrame aFrame = new JFrame("Video Frame");
            JPanel aPanel = new JPanel();
            aPanel.setBounds(0, 0, 176, 144);
            aPanel.add(vc);
            aFrame.add(aPanel);

            aPanel.setBackground(Color.gray);

            vc.setVisible(true);
            aPanel.setVisible(true);
            aFrame.setVisible(true);
            aFrame.pack();
        }
    }

    if (ce instanceof ControllerErrorEvent) {
        p.removeControllerListener(this);
        System.err.println("Receiver internal error: " + ce);
    }

}
 
开发者ID:visit,项目名称:spark-svn-mirror,代码行数:42,代码来源:VideoReceiver.java


注:本文中的javax.media.Player.removeControllerListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。