Package swingtree.api

Interface AnimatedStyler<C extends JComponent>

Type Parameters:
C - the type of the JComponent that the ComponentStyleDelegate is delegating to.
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AnimatedStyler<C extends JComponent>
An AnimatedStyler is conceptually a union of the Animation and Styler functions, which is to say that it takes both an AnimationState and a ComponentStyleDelegate to produce a new ComponentStyleDelegate with some style properties applied to it (usually based on the AnimationState).
Note that both paramters are immutable value oriented objects, so the function is pure and does not modify the original ComponentStyleDelegate or AnimationState objects.
This design makes the underlying style engine of SwingTree very flexible and scalable because it allows for the composition of styles and reuse of style logic across many components (see StyleSheet for more advanced usage).

This interface is typically used in AbstractDelegate.animateStyleFor(LifeTime, AnimatedStyler) and AbstractDelegate.animateStyleFor(double, TimeUnit, AnimatedStyler).