Package swingtree.api.laf
@NullMarked
package swingtree.api.laf
What a custom Look and Feel needs in order to render through the SwingTree style engine:
the
SwingTreeStyledComponentUI interface a
ComponentUI implements to be styled by it, and the drawing primitives
the engine itself uses, which a delegate painting its own chrome wants for the same reasons.-
ClassDescriptionA utility class for optimized shape filling, the way the SwingTree style engine does it for its own surfaces: antialiasing stays on wherever the outline actually curves, and is switched off everywhere else.
It optimizes shape filling specifically by turning antialiasing off strategically for parts which do not need it because the result looks identical.SwingTreeStyledComponentUI<C extends JComponent>This interface is intended to be implemented by the variousComponentUIextensions of a custom Look and Feel which desires to fully integrate with the SwingTree style engine.
For context, it is important to note that SwingTree ships with a rich style rendering engine and three main ways for configuring styles.
The most prominent once, which are typically used to build an application, are: Global Styling: seeStyleSheet,UIFactoryMethods.use(StyleSheet, Supplier),SwingTree.initializeUsing(SwingTreeConfigurator)Direct Styling in the GUI:
seeUIForAnySwing.withStyle(Styler)
alsoUIForAnySwing.withTransitionalStyle(Val, LifeTime, AnimatedStyler)
andUIForAnySwing.withTransitoryStyle(Observable, LifeTime, AnimatedStyler)The third major way of styling is through theComponentUIof a custom Look and Feel implementing this marker interfaceSwingTreeStyledComponentUI.