Package org.pushingpixels.trident.swing
Class SwingRepaintCallback
- java.lang.Object
-
- org.pushingpixels.trident.callback.TimelineCallbackAdapter
-
- org.pushingpixels.trident.swing.SwingRepaintCallback
-
- All Implemented Interfaces:
TimelineCallback
public class SwingRepaintCallback extends TimelineCallbackAdapter
-
-
Constructor Summary
Constructors Constructor Description SwingRepaintCallback(Component comp)SwingRepaintCallback(Component comp, Rectangle rect)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidforceRepaintOnNextPulse()voidonTimelinePulse(float durationFraction, float timelinePosition)Indicates that the timeline pulse has happened.voidonTimelineStateChanged(Timeline.TimelineState oldState, Timeline.TimelineState newState, float durationFraction, float timelinePosition)Indicates that the timeline state has changed.voidsetAutoRepaintMode(boolean autoRepaintMode)voidsetRepaintRectangle(Rectangle rect)
-
-
-
Method Detail
-
setAutoRepaintMode
public void setAutoRepaintMode(boolean autoRepaintMode)
-
forceRepaintOnNextPulse
public void forceRepaintOnNextPulse()
-
setRepaintRectangle
public void setRepaintRectangle(Rectangle rect)
-
onTimelinePulse
public void onTimelinePulse(float durationFraction, float timelinePosition)Description copied from interface:TimelineCallbackIndicates that the timeline pulse has happened.- Specified by:
onTimelinePulsein interfaceTimelineCallback- Overrides:
onTimelinePulsein classTimelineCallbackAdapter- Parameters:
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 toTimeline.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 theTimeline.setEase(org.pushingpixels.trident.ease.TimelineEase).
-
onTimelineStateChanged
public void onTimelineStateChanged(Timeline.TimelineState oldState, Timeline.TimelineState newState, float durationFraction, float timelinePosition)
Description copied from interface:TimelineCallbackIndicates that the timeline state has changed.- Specified by:
onTimelineStateChangedin interfaceTimelineCallback- Overrides:
onTimelineStateChangedin classTimelineCallbackAdapter- Parameters:
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 toTimeline.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 theTimeline.setEase(org.pushingpixels.trident.ease.TimelineEase).
-
-