本文整理匯總了Java中javax.media.StopByRequestEvent類的典型用法代碼示例。如果您正苦於以下問題:Java StopByRequestEvent類的具體用法?Java StopByRequestEvent怎麽用?Java StopByRequestEvent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
StopByRequestEvent類屬於javax.media包,在下文中一共展示了StopByRequestEvent類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: doStopAction
import javax.media.StopByRequestEvent; //導入依賴的package包/類
private boolean doStopAction() {
switch (state) {
case Started:
ControllerErrorEvent error = doStop(false);
if (error == null) {
state = Prefetched;
notifyListeners(new StopByRequestEvent(this, Started, Prefetched, Prefetched, getMediaTime()));
} else {
notifyListeners(error);
return false;
}
break;
default:
notifyListeners(new StopByRequestEvent(this, state, state, state, getMediaTime()));
break;
}
return true;
}
示例2: postStopByRequestEvent
import javax.media.StopByRequestEvent; //導入依賴的package包/類
/**
* Post a StopByRequestEvent to the Media Event Queue.
* Automatically fill in the Previous State, Current State,
* Target State, and Media Time properties of the
* StopByRequestEvent.
*/
protected void postStopByRequestEvent() {
postEvent( new StopByRequestEvent(
this, previousState, currentState, targetState, getMediaTime()) );
}