org.robokind.integration.animation_motion
Class AnimationJobFrameSource
java.lang.Object
org.robokind.api.common.playable.AbstractPlayable
org.robokind.integration.animation_motion.AnimationJobFrameSource
- All Implemented Interfaces:
- org.robokind.api.animation.player.AnimationJob, org.robokind.api.common.playable.Playable, org.robokind.api.motion.protocol.FrameSource<org.robokind.api.motion.Robot.RobotPositionMap>
public class AnimationJobFrameSource
- extends org.robokind.api.common.playable.AbstractPlayable
- implements org.robokind.api.animation.player.AnimationJob, org.robokind.api.motion.protocol.FrameSource<org.robokind.api.motion.Robot.RobotPositionMap>
An implementation of an AnimationJob which expects to be queried for new
positions as a FrameSource.
- Author:
- Matthew Stevenson
Fields inherited from class org.robokind.api.common.playable.AbstractPlayable |
myElapsedPauseTime, myPauseTime, myPlayableListeners, myPlayState, myResumeTime, myStartTime, myStopTime |
Methods inherited from class org.robokind.api.common.playable.AbstractPlayable |
addPlayableListener, complete, firePlayStateChanged, getElapsedPauseTime, getElapsedPlayTime, getPauseTime, getPlayState, getResumeTime, getStartTime, getStopTime, pause, removePlayableListener, resume, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.robokind.api.common.playable.Playable |
addPlayableListener, complete, getElapsedPauseTime, getElapsedPlayTime, getPauseTime, getPlayState, getResumeTime, getStartTime, getStopTime, pause, removePlayableListener, resume, start, stop |
setSource
public void setSource(org.robokind.api.animation.player.AnimationPlayer source)
- Sets the AnimationPlayer which created the AnimationJobFrameSource.
- Parameters:
source
- AnimationPlayer which created the AnimationJobFrameSource
getSource
public org.robokind.api.animation.player.AnimationPlayer getSource()
- Specified by:
getSource
in interface org.robokind.api.animation.player.AnimationJob
addAnimationListener
public void addAnimationListener(org.robokind.api.animation.player.AnimationJobListener listener)
- Specified by:
addAnimationListener
in interface org.robokind.api.animation.player.AnimationJob
removeAnimationListener
public void removeAnimationListener(org.robokind.api.animation.player.AnimationJobListener listener)
- Specified by:
removeAnimationListener
in interface org.robokind.api.animation.player.AnimationJob
getAnimation
public org.robokind.api.animation.Animation getAnimation()
- Specified by:
getAnimation
in interface org.robokind.api.animation.player.AnimationJob
getCurrentTime
public Long getCurrentTime(long time)
advanceAnimation
public Map<Integer,Double> advanceAnimation(long time,
long interval)
- Specified by:
advanceAnimation
in interface org.robokind.api.animation.player.AnimationJob
getMovements
public org.robokind.api.motion.protocol.MotionFrame getMovements(long time,
long interval)
- Specified by:
getMovements
in interface org.robokind.api.motion.protocol.FrameSource<org.robokind.api.motion.Robot.RobotPositionMap>
onStart
public boolean onStart(long time)
- Specified by:
onStart
in class org.robokind.api.common.playable.AbstractPlayable
getAnimationLength
public Long getAnimationLength()
- Specified by:
getAnimationLength
in interface org.robokind.api.animation.player.AnimationJob
getRemainingTime
public Long getRemainingTime(long time)
- Specified by:
getRemainingTime
in interface org.robokind.api.animation.player.AnimationJob
onPause
protected boolean onPause(long time)
- Specified by:
onPause
in class org.robokind.api.common.playable.AbstractPlayable
onResume
protected boolean onResume(long time)
- Specified by:
onResume
in class org.robokind.api.common.playable.AbstractPlayable
onStop
protected boolean onStop(long time)
- Specified by:
onStop
in class org.robokind.api.common.playable.AbstractPlayable
onComplete
protected boolean onComplete(long time)
- Specified by:
onComplete
in class org.robokind.api.common.playable.AbstractPlayable
afterComplete
protected void afterComplete(long time)
- Overrides:
afterComplete
in class org.robokind.api.common.playable.AbstractPlayable
setLoop
public void setLoop(boolean loop)
- Specified by:
setLoop
in interface org.robokind.api.animation.player.AnimationJob
getLoop
public boolean getLoop()
- Specified by:
getLoop
in interface org.robokind.api.animation.player.AnimationJob
Copyright © 2011. All Rights Reserved.