Package com.inductiveautomation.rm.base
Class RMKeyTimer
- java.lang.Object
- 
- javax.swing.Timer
- 
- com.inductiveautomation.rm.base.RMKeyTimer
 
 
- 
- All Implemented Interfaces:
- java.awt.event.ActionListener,- java.io.Serializable,- java.util.EventListener
 
 public class RMKeyTimer extends javax.swing.Timer implements java.awt.event.ActionListenerThis class provides methods to set values (using RMKey) over time using an interpolator.- See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classRMKeyTimer.RecordA class representing an individual change to be animated by this timer.
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedRMKeyTimer(java.lang.Object anObj, java.lang.String aKey, java.lang.Object aValue, long aDuration, float aFrameRate, RMInterpolator anInterpolator)Creates a new timer.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)ActionListener method - called whenever timer fires.voidaddRecord(RMKeyTimer.Record aRecord)Adds a record.voidaddRecord(java.lang.String aKey, java.lang.Object endValue, RMInterpolator anInterpolator)Adds a new key change record.voidaddRecord(java.lang.String aKey, java.lang.Object startValue, java.lang.Object endValue, RMInterpolator anInterpolator)Adds a new absolute key change record to the timer.RMKeyTimer.RecordgetRecord(int anIndex)Returns the individual record at given index.intgetRecordCount()Returns the number of records in this timer.RMKeyTimer.RecordremoveRecord(int anIndex)Removes the record at given index.voidremoveRecord(java.lang.String aKey)Deletes any record with given key.static RMKeyTimersetValue(java.lang.Object anObj, java.lang.String aKey, java.lang.Object aValue, long aDuration, float aFrameRate, RMInterpolator anInterpolator)Convenience method to create and start a timer.voidstart()Overrides normal start to set start time.voidstop()Overrides to remove from timers list.- 
Methods inherited from class javax.swing.TimeraddActionListener, fireActionPerformed, getActionCommand, getActionListeners, getDelay, getInitialDelay, getListeners, getLogTimers, isCoalesce, isRepeats, isRunning, removeActionListener, restart, setActionCommand, setCoalesce, setDelay, setInitialDelay, setLogTimers, setRepeats
 
- 
 
- 
- 
- 
Constructor Detail- 
RMKeyTimerprotected RMKeyTimer(java.lang.Object anObj, java.lang.String aKey, java.lang.Object aValue, long aDuration, float aFrameRate, RMInterpolator anInterpolator)Creates a new timer.
 
- 
 - 
Method Detail- 
setValuepublic static RMKeyTimer setValue(java.lang.Object anObj, java.lang.String aKey, java.lang.Object aValue, long aDuration, float aFrameRate, RMInterpolator anInterpolator) Convenience method to create and start a timer.
 - 
getRecordCountpublic int getRecordCount() Returns the number of records in this timer.
 - 
getRecordpublic RMKeyTimer.Record getRecord(int anIndex) Returns the individual record at given index.
 - 
addRecordpublic void addRecord(RMKeyTimer.Record aRecord) Adds a record.
 - 
removeRecordpublic RMKeyTimer.Record removeRecord(int anIndex) Removes the record at given index.
 - 
addRecordpublic void addRecord(java.lang.String aKey, java.lang.Object endValue, RMInterpolator anInterpolator)Adds a new key change record. The change is relative to the current value.
 - 
addRecordpublic void addRecord(java.lang.String aKey, java.lang.Object startValue, java.lang.Object endValue, RMInterpolator anInterpolator)Adds a new absolute key change record to the timer.
 - 
removeRecordpublic void removeRecord(java.lang.String aKey) Deletes any record with given key.
 - 
startpublic void start() Overrides normal start to set start time.- Overrides:
- startin class- javax.swing.Timer
 
 - 
stoppublic void stop() Overrides to remove from timers list.- Overrides:
- stopin class- javax.swing.Timer
 
 - 
actionPerformedpublic void actionPerformed(java.awt.event.ActionEvent e) ActionListener method - called whenever timer fires.- Specified by:
- actionPerformedin interface- java.awt.event.ActionListener
 
 
- 
 
-