Class RMAnimUtils
- java.lang.Object
-
- com.inductiveautomation.rm.base.RMListenerList
-
- com.inductiveautomation.rm.base.RMObject
-
- com.inductiveautomation.rm.graphics.RMAnimUtils
-
- All Implemented Interfaces:
RMPropertyChanger
,java.lang.Cloneable
public class RMAnimUtils extends RMObject
This class holds a number of convenient static methods used for animation stuff.
-
-
Constructor Summary
Constructors Constructor Description RMAnimUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addTime(java.util.List<java.lang.Number> aList, java.lang.Number aTime)
Adds a given time to the given list at the proper ordered index.static void
addTimes(java.util.List<java.lang.Number> aList, java.util.List<java.lang.Number> theTimes)
Adds the list of times in list 2 to the given list of times in list 1 at the proper ordered indexes.static boolean
containsTime(java.util.List<? extends java.lang.Number> aList, float aTime)
Returns whether a given list contains a given float time.static int
indexOfTime(java.util.List<? extends java.lang.Number> aList, float aTime)
Returns the index of a given time in the given list.static int
indexOfTimeAfterTime(java.util.List<? extends java.lang.Number> aList, float aTime)
Returns the index of the time in the given list that is closest but just past the given time.static int
indexOfTimeBeforeTime(java.util.List<? extends java.lang.Number> aList, float aTime)
Returns the index of the time in the given list that is closest without going past the given time.static void
removeTimeBetweenTimes(java.util.List<? extends java.lang.Number> aList, float startTime, float endTime)
Removes the times between the two given times (not including the two times).static java.lang.Number
timeAfterTime(java.util.List<? extends java.lang.Number> aList, float aTime)
Returns the time in the given list that is just after the given time (or null if no such time).static java.lang.Number
timeBeforeTime(java.util.List<? extends java.lang.Number> aList, float aTime)
Returns the time in the given list that is just before the given time (or null if no such time).-
Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange, toString
-
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, clone, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
-
-
-
Method Detail
-
containsTime
public static boolean containsTime(java.util.List<? extends java.lang.Number> aList, float aTime)
Returns whether a given list contains a given float time.
-
indexOfTime
public static int indexOfTime(java.util.List<? extends java.lang.Number> aList, float aTime)
Returns the index of a given time in the given list.
-
indexOfTimeBeforeTime
public static int indexOfTimeBeforeTime(java.util.List<? extends java.lang.Number> aList, float aTime)
Returns the index of the time in the given list that is closest without going past the given time.
-
indexOfTimeAfterTime
public static int indexOfTimeAfterTime(java.util.List<? extends java.lang.Number> aList, float aTime)
Returns the index of the time in the given list that is closest but just past the given time.
-
timeBeforeTime
public static java.lang.Number timeBeforeTime(java.util.List<? extends java.lang.Number> aList, float aTime)
Returns the time in the given list that is just before the given time (or null if no such time).
-
timeAfterTime
public static java.lang.Number timeAfterTime(java.util.List<? extends java.lang.Number> aList, float aTime)
Returns the time in the given list that is just after the given time (or null if no such time).
-
addTime
public static void addTime(java.util.List<java.lang.Number> aList, java.lang.Number aTime)
Adds a given time to the given list at the proper ordered index.
-
addTimes
public static void addTimes(java.util.List<java.lang.Number> aList, java.util.List<java.lang.Number> theTimes)
Adds the list of times in list 2 to the given list of times in list 1 at the proper ordered indexes.
-
removeTimeBetweenTimes
public static void removeTimeBetweenTimes(java.util.List<? extends java.lang.Number> aList, float startTime, float endTime)
Removes the times between the two given times (not including the two times).
-
-