styleable

Declares style as the component's style. The style can set every java.awt.Component and JComponent property and provide nested styles to the components below. Put it last in the modifier.

Throws IllegalArgumentException when applied to a component that is not a JComponent; use the overload taking a SwingStyleKind there.

Multiple styles apply in modifier order.

The styleable API is subject to change while the AndroidX Styles API it follows is experimental.

Return

this modifier followed by the style declaration.

Parameters

style

the caller's style.


Applies kind's default style followed by style to this component.

The style runs during component application and when an observed input changes. Put this declaration after modifiers whose properties the style should override. Multiple styles apply in modifier order.

The styleable API is subject to change while the AndroidX Styles API it follows is experimental.

Return

this modifier followed by the style declaration.

Parameters

kind

builds the style scope and supplies the default style.

style

the caller's style, applied after the kind's default.


Applies kind's default style followed by style to this component.

The style runs during component application and when an observed input changes. Put this declaration after modifiers whose properties the style should override. Multiple styles apply in modifier order.

The styleable API is subject to change while the AndroidX Styles API it follows is experimental.

Return

this modifier followed by the style declaration.

Parameters

kind

builds the style scope and supplies the default style.

state

the current input used to build the scope; a different instance rebuilds it.

style

the caller's style, applied after the kind's default.