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


Java StopTimeChangeEvent类代码示例

本文整理汇总了Java中javax.media.StopTimeChangeEvent的典型用法代码示例。如果您正苦于以下问题:Java StopTimeChangeEvent类的具体用法?Java StopTimeChangeEvent怎么用?Java StopTimeChangeEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: setStopTime

import javax.media.StopTimeChangeEvent; //导入依赖的package包/类
/**
 * Sets the stop time for this AbstractController.  Posts a
 * StopTimeChangeEvent if the stop time given is different
 * than the current stop time.
 *
 * @param      mediaStopTime
 *             The time at which you want the
 *             <tt>Clock</tt> to stop, in <i>media
 *             time</i>.
 *
 * @exception  NotRealizedError
 *             If the Controller is not Realized.
 *
 * @exception  ClockStartedError
 *             If the Controller is Started.
 */
public synchronized void setStopTime(Time mediaStopTime) {
    if(currentState == Unrealized ||
       currentState == Realizing)
    {
        throw new NotRealizedError(
            "Cannot set stop time on an unrealized Controller");
    }

    Time oldStopTime = getStopTime();

    //  If the stop time has changed, post an event
    if( mediaStopTime.getNanoseconds() !=
        oldStopTime.getNanoseconds() )
    {
        //  Set in superclass
        super.setStopTime(mediaStopTime);

        //  Post event
        postEvent(
            new StopTimeChangeEvent(this, mediaStopTime) );
    }
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:39,代码来源:AbstractController.java

示例2: controllerUpdate

import javax.media.StopTimeChangeEvent; //导入依赖的package包/类
/**
 * Listen for RateChangeEvents or MediaTimeSetEvents and
 * notify the StopTimeMonitor thread to recalculate its wait
 * time.  Also listen for StartEvents and StopEvents so that
 * the monitor will know whether the controller is playing.
 *
 * @param      e
 *             The ControllerEvent
 */
public synchronized void controllerUpdate(ControllerEvent e) {
    if( e instanceof StopTimeChangeEvent ||
        e instanceof RateChangeEvent || 
        e instanceof MediaTimeSetEvent ||
        e instanceof StartEvent ||
       (e instanceof StopEvent && ! (e instanceof DeallocateEvent) ) )
    {
        wokenUp = true;
        notifyAll();
    }
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:21,代码来源:StopTimeMonitor.java

示例3: postStopTimeChangeEvent

import javax.media.StopTimeChangeEvent; //导入依赖的package包/类
private void postStopTimeChangeEvent() {
    notifyListeners(new StopTimeChangeEvent(this, getStopTime()));
}
 
开发者ID:ShiftMediaProject,项目名称:libbluray,代码行数:4,代码来源:BDHandler.java


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