Package org.jdesktop.animation.timing
Class TimingTargetAdapter
- java.lang.Object
-
- org.jdesktop.animation.timing.TimingTargetAdapter
-
- All Implemented Interfaces:
TimingTarget
- Direct Known Subclasses:
PropertySetter
public class TimingTargetAdapter extends java.lang.Object implements TimingTarget
Implements theTimingTargetinterface, providing stubs for all TimingTarget methods. Subclasses may extend this adapter rather than implementing the TimingTarget interface if they only care about a subset of the events that TimingTarget provides. For example, sequencing animations may only require monitoring theTimingTarget.end()method, so subclasses of this adapter may ignore the other methods such as timingEvent.
-
-
Constructor Summary
Constructors Constructor Description TimingTargetAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbegin()Called when the Animator's animation begins.voidend()Called when the Animator's animation endsvoidrepeat()Called when the Animator repeats the animation cyclevoidtimingEvent(float fraction)This method will receive all of the timing events from an Animator during an animation.
-
-
-
Method Detail
-
timingEvent
public void timingEvent(float fraction)
This method will receive all of the timing events from an Animator during an animation. The fraction is the percent elapsed (0 to 1) of the current animation cycle.- Specified by:
timingEventin interfaceTimingTarget- Parameters:
fraction- the fraction of completion between the start and end of the current cycle. Note that on reversing cycles (Animator.Direction.BACKWARD) the fraction decreases from 1.0 to 0 on backwards-running cycles. Note also that animations with a duration ofINFINITEwill call timingEvent with an undefined value for fraction, since there is no fraction that makes sense if the animation has no defined length.- See Also:
Animator.Direction
-
begin
public void begin()
Called when the Animator's animation begins. This provides a chance for targets to perform any setup required at animation start time.- Specified by:
beginin interfaceTimingTarget
-
end
public void end()
Called when the Animator's animation ends- Specified by:
endin interfaceTimingTarget
-
repeat
public void repeat()
Called when the Animator repeats the animation cycle- Specified by:
repeatin interfaceTimingTarget
-
-