de.matthiasmann.twl.renderer
Interface AnimationState

All Known Subinterfaces:
AttributedString
All Known Implementing Classes:
AnimationState, StringAttributes

public interface AnimationState

Time source for animations.


Nested Class Summary
static class AnimationState.StateKey
          An animation state key which maps each animation state name to an unique ID.
 
Method Summary
 boolean getAnimationState(AnimationState.StateKey state)
          Checks if the given state is active.
 int getAnimationTime(AnimationState.StateKey state)
          Returns the time since the specified state has changed in ms.
 boolean getShouldAnimateState(AnimationState.StateKey state)
          Checks if this state was changed based on user interaction or not.
 

Method Detail

getAnimationTime

int getAnimationTime(AnimationState.StateKey state)
Returns the time since the specified state has changed in ms. If the specified state was never changed then a free running time is returned.

Parameters:
state - the state key.
Returns:
time since last state change is ms.

getAnimationState

boolean getAnimationState(AnimationState.StateKey state)
Checks if the given state is active.

Parameters:
state - the state key.
Returns:
true if the state is set

getShouldAnimateState

boolean getShouldAnimateState(AnimationState.StateKey state)
Checks if this state was changed based on user interaction or not. If this method returns false then the animation time should not be used for single shot animations.

Parameters:
state - the state key.
Returns:
true if single shot animations should run or not.