nestingStyleKind

fun <S : ComponentStyleScope, T> nestingStyleKind(scope: (base: NestedStyleProviderScope, state: T) -> S, default: SwingStyle<S>): SwingStyleKind<S, T>

A kind whose default only applies nested styles, such as applyNestedStyle(key). With no style of its own and no publishing ancestor, a component of this kind runs no default and holds no style resolution.

The default may contain nothing else: it fails with an IllegalStateException when it runs and writes a property outside an applied nested style, because that write would be lost wherever the default is not run. A kind whose default sets a property itself is built with the SwingStyleKind constructor. The caller's own style is not restricted.

Parameters

scope

builds the scope a style of this kind runs against from its base and the kind's state. The scope delegates to the base the interfaces it extends.

default

the style applied before the caller's own; it may only apply nested styles.