org.robokind.api.animation.utils
Class AnimationUtils

java.lang.Object
  extended by org.robokind.api.animation.utils.AnimationUtils

public class AnimationUtils
extends Object

Author:
Matthew Stevenson

Constructor Summary
AnimationUtils()
           
 
Method Summary
static void addAnimationToLibrary(org.osgi.framework.BundleContext context, Animation animation, String filter)
           
static Animation fetchAnimation(org.osgi.framework.BundleContext context, String animVersionName, String filter)
           
static Animation fetchAnimation(org.osgi.framework.BundleContext context, org.robokind.api.common.config.VersionProperty animVersion, String filter)
           
static org.osgi.framework.ServiceReference getAnimationPlayerReference(org.osgi.framework.BundleContext context, String filter)
          Returns a ServiceReference for an AnimationPlayer matching the filter if it is not null.
static ChannelsParameterSource getChannelsParameterSource()
           
static AnimationLibrary loadAnimationLibrary(org.osgi.framework.BundleContext context, String animationPath, boolean recursive, FilenameFilter filenameFilter)
           
static AnimationJob playAnimation(org.osgi.framework.BundleContext context, String filter, Animation anim)
          Fetches an AnimationPlayer and plays the given Animation.
static AnimationJob playAnimation(org.osgi.framework.BundleContext context, String filter, Animation anim, long startTime, long stopTime)
          Fetches an AnimationPlayer and plays the given Animation with the given start and stop time.
static org.osgi.framework.ServiceRegistration registerAnimationLibrary(org.osgi.framework.BundleContext context, AnimationLibrary library, Properties serviceProps)
           
static void writePositions(long x, Map<Integer,Double> channelPositions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimationUtils

public AnimationUtils()
Method Detail

getChannelsParameterSource

public static ChannelsParameterSource getChannelsParameterSource()

writePositions

public static void writePositions(long x,
                                  Map<Integer,Double> channelPositions)

getAnimationPlayerReference

public static org.osgi.framework.ServiceReference getAnimationPlayerReference(org.osgi.framework.BundleContext context,
                                                                              String filter)
Returns a ServiceReference for an AnimationPlayer matching the filter if it is not null.

Parameters:
context - BundleContext to use
filter - option OSGi filter String
Returns:
ServiceReference for an AnimationPlayer matching the filter if it is not null

playAnimation

public static AnimationJob playAnimation(org.osgi.framework.BundleContext context,
                                         String filter,
                                         Animation anim)
Fetches an AnimationPlayer and plays the given Animation. If a filter String is provided, it is used to match an AnimationPlayer.

Parameters:
context - BundleContext to use
filter - option OSGi filter String
anim - Animation to play
Returns:
AnimationJob created from playing the Animation, returns null if unsuccessful

playAnimation

public static AnimationJob playAnimation(org.osgi.framework.BundleContext context,
                                         String filter,
                                         Animation anim,
                                         long startTime,
                                         long stopTime)
Fetches an AnimationPlayer and plays the given Animation with the given start and stop time. If a filter String is provided, it is used to match an AnimationPlayer.

Parameters:
context - BundleContext to use
filter - option OSGi filter String
anim - Animation to play
startTime - Animation start time in milliseconds from the beginning of the animation
stopTime - Animation stop time in milliseconds from the beginning of the animation
Returns:
AnimationJob created from playing the Animation, returns null if unsuccessful

loadAnimationLibrary

public static AnimationLibrary loadAnimationLibrary(org.osgi.framework.BundleContext context,
                                                    String animationPath,
                                                    boolean recursive,
                                                    FilenameFilter filenameFilter)

registerAnimationLibrary

public static org.osgi.framework.ServiceRegistration registerAnimationLibrary(org.osgi.framework.BundleContext context,
                                                                              AnimationLibrary library,
                                                                              Properties serviceProps)

addAnimationToLibrary

public static void addAnimationToLibrary(org.osgi.framework.BundleContext context,
                                         Animation animation,
                                         String filter)

fetchAnimation

public static Animation fetchAnimation(org.osgi.framework.BundleContext context,
                                       org.robokind.api.common.config.VersionProperty animVersion,
                                       String filter)

fetchAnimation

public static Animation fetchAnimation(org.osgi.framework.BundleContext context,
                                       String animVersionName,
                                       String filter)


Copyright © 2011. All Rights Reserved.