Package swingtree.api

Interface Styler<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 Styler<C extends JComponent>
A Styler is a function that takes a ComponentStyleDelegate and then transforms and returns it with some new style properties (see UIForAnySwing.withStyle(Styler)).
Note that all of this is done in a functional manner, so the original ComponentStyleDelegate as well as the delegated StyleConf object is not modified because ComponentStyleDelegate is an immutable object.
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).