public class RMKeyTimer
extends javax.swing.Timer
implements java.awt.event.ActionListener
Modifier and Type | Class and Description |
---|---|
static class |
RMKeyTimer.Record
A class representing an individual change to be animated by this timer.
|
Constructor and Description |
---|
RMKeyTimer(java.lang.Object anObj,
java.lang.String aKey,
java.lang.Object aValue,
float aDuration,
float aFrameRate,
RMInterpolator anInterpolator)
Creates a new timer.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
ActionListener method - called whenever timer fires.
|
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.
|
void |
addRecord(java.lang.String aKey,
java.lang.Object endValue,
RMInterpolator anInterpolator)
Adds a new key change record.
|
RMKeyTimer.Record |
getRecord(int anIndex)
Returns the individual record at given index.
|
int |
getRecordCount()
Returns the number of records in this timer.
|
float |
getSecondsElapsed()
Returns the number of seconds the animator has been playing for.
|
void |
removeRecord(java.lang.String aKey)
Deletes any record with given key.
|
static RMKeyTimer |
setValue(java.lang.Object anObj,
java.lang.String aKey,
java.lang.Object aValue,
float aDuration,
float aFrameRate,
RMInterpolator anInterpolator)
Convenience method to create and start a timer.
|
void |
start()
Overrides normal start to set start time.
|
void |
stop()
Overrides to remove from timers list.
|
addActionListener, getActionCommand, getActionListeners, getDelay, getInitialDelay, getListeners, getLogTimers, isCoalesce, isRepeats, isRunning, removeActionListener, restart, setActionCommand, setCoalesce, setDelay, setInitialDelay, setLogTimers, setRepeats
public RMKeyTimer(java.lang.Object anObj, java.lang.String aKey, java.lang.Object aValue, float aDuration, float aFrameRate, RMInterpolator anInterpolator)
public static RMKeyTimer setValue(java.lang.Object anObj, java.lang.String aKey, java.lang.Object aValue, float aDuration, float aFrameRate, RMInterpolator anInterpolator)
public int getRecordCount()
public RMKeyTimer.Record getRecord(int anIndex)
public void addRecord(java.lang.String aKey, java.lang.Object endValue, RMInterpolator anInterpolator)
public void addRecord(java.lang.String aKey, java.lang.Object startValue, java.lang.Object endValue, RMInterpolator anInterpolator)
public void removeRecord(java.lang.String aKey)
public void start()
start
in class javax.swing.Timer
public void stop()
stop
in class javax.swing.Timer
public float getSecondsElapsed()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener