org.robokind.integration.animation_motion
Class DefaultAnimationPlayer

java.lang.Object
  extended by org.robokind.integration.animation_motion.DefaultAnimationPlayer
All Implemented Interfaces:
org.robokind.api.animation.player.AnimationPlayer

public class DefaultAnimationPlayer
extends Object
implements org.robokind.api.animation.player.AnimationPlayer

AnimationPlayer which creates AnimationJobFrameSource and registers them with the OSGi service registry to be used as FrameSources.

Author:
Matthew Stevenson

Constructor Summary
DefaultAnimationPlayer(org.osgi.framework.BundleContext context, org.robokind.api.motion.Robot.Id robotId)
          Creates a new OSGiAnimationPlayer using the given BundleContext.
 
Method Summary
 List<org.robokind.api.animation.player.AnimationJob> getCurrentAnimations()
           
 org.robokind.api.motion.Robot.Id getRobotId()
          Returns the robotId this Animation Player uses.
 long getStepLength()
          Returns the step length for new AnimationJobs.
 org.robokind.api.animation.player.AnimationJob playAnimation(org.robokind.api.animation.Animation animation)
           
 org.robokind.api.animation.player.AnimationJob playAnimation(org.robokind.api.animation.Animation animation, Long start, Long stop)
           
 void removeAnimationJob(org.robokind.api.animation.player.AnimationJob job)
           
 void setRobotId(org.robokind.api.motion.Robot.Id robotId)
           
 void setStepLength(long val)
          Sets the step length for AnimationJobs created by this player.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAnimationPlayer

public DefaultAnimationPlayer(org.osgi.framework.BundleContext context,
                              org.robokind.api.motion.Robot.Id robotId)
Creates a new OSGiAnimationPlayer using the given BundleContext.

Parameters:
context - BundleContext to be used by the OSGiAnimationPlayer
Method Detail

setRobotId

public void setRobotId(org.robokind.api.motion.Robot.Id robotId)

getRobotId

public org.robokind.api.motion.Robot.Id getRobotId()
Returns the robotId this Animation Player uses.

Returns:
robotId this Animation Player uses

setStepLength

public void setStepLength(long val)
Sets the step length for AnimationJobs created by this player.

Parameters:
val - new step length in milliseconds

getStepLength

public long getStepLength()
Returns the step length for new AnimationJobs.

Returns:
step length for new AnimationJobs

playAnimation

public org.robokind.api.animation.player.AnimationJob playAnimation(org.robokind.api.animation.Animation animation)
Specified by:
playAnimation in interface org.robokind.api.animation.player.AnimationPlayer

getCurrentAnimations

public List<org.robokind.api.animation.player.AnimationJob> getCurrentAnimations()
Specified by:
getCurrentAnimations in interface org.robokind.api.animation.player.AnimationPlayer

removeAnimationJob

public void removeAnimationJob(org.robokind.api.animation.player.AnimationJob job)
Specified by:
removeAnimationJob in interface org.robokind.api.animation.player.AnimationPlayer

playAnimation

public org.robokind.api.animation.player.AnimationJob playAnimation(org.robokind.api.animation.Animation animation,
                                                                    Long start,
                                                                    Long stop)
Specified by:
playAnimation in interface org.robokind.api.animation.player.AnimationPlayer


Copyright © 2011. All Rights Reserved.