public class SwingRepaintCallback extends TimelineCallbackAdapter
Constructor and Description |
---|
SwingRepaintCallback(java.awt.Component comp) |
SwingRepaintCallback(java.awt.Component comp,
java.awt.Rectangle rect) |
Modifier and Type | Method and Description |
---|---|
void |
forceRepaintOnNextPulse() |
void |
onTimelinePulse(float durationFraction,
float timelinePosition)
Indicates that the timeline pulse has happened.
|
void |
onTimelineStateChanged(Timeline.TimelineState oldState,
Timeline.TimelineState newState,
float durationFraction,
float timelinePosition)
Indicates that the timeline state has changed.
|
void |
setAutoRepaintMode(boolean autoRepaintMode) |
void |
setRepaintRectangle(java.awt.Rectangle rect) |
public SwingRepaintCallback(java.awt.Component comp)
public SwingRepaintCallback(java.awt.Component comp, java.awt.Rectangle rect)
public void setAutoRepaintMode(boolean autoRepaintMode)
public void forceRepaintOnNextPulse()
public void setRepaintRectangle(java.awt.Rectangle rect)
public void onTimelinePulse(float durationFraction, float timelinePosition)
TimelineCallback
onTimelinePulse
in interface TimelineCallback
onTimelinePulse
in class TimelineCallbackAdapter
durationFraction
- The current timeline duration fraction.Is guaranteed to be in
0.0-1.0 range. The rate of change of this value is linear, and
the value is proportional to
Timeline.setDuration(long)
.timelinePosition
- The current timeline position. Is guaranteed to be in 0.0-1.0
range. The rate of change of this value is not necessarily
linear and is affected by the
Timeline.setEase(org.pushingpixels.trident.ease.TimelineEase)
.public void onTimelineStateChanged(Timeline.TimelineState oldState, Timeline.TimelineState newState, float durationFraction, float timelinePosition)
TimelineCallback
onTimelineStateChanged
in interface TimelineCallback
onTimelineStateChanged
in class TimelineCallbackAdapter
oldState
- The old timeline state.newState
- The new timeline state.durationFraction
- The current timeline duration fraction.Is guaranteed to be in
0.0-1.0 range. The rate of change of this value is linear, and
the value is proportional to
Timeline.setDuration(long)
.timelinePosition
- The current timeline position. Is guaranteed to be in 0.0-1.0
range. The rate of change of this value is not necessarily
linear and is affected by the
Timeline.setEase(org.pushingpixels.trident.ease.TimelineEase)
.