radiance-theming-ktx
for build instructions of the latest stable release.
In your Java app, this is how you would mark a BreadcrumbBarSelector
to use the HEADER
decoration area type:
BreadcrumbFileSelector bar = new BreadcrumbFileSelector();
RadianceThemingCortex.ComponentOrParentChainScope.setDecorationType(bar,
RadianceThemingSlices.DecorationAreaType.HEADER);
And here is how the same code would look like in Kotlin using a Radiance-provided extension on the JComponent
class:
val bar = BreadcrumbFileSelector()
bar.setDecorationType(RadianceThemingSlices.DecorationAreaType.HEADER)
Kotlin scopes mirror scopes defined in RadianceThemingCortex
:
RadianceWindowScope
- configuring and querying state at the level of the applicationWindow
s.RadianceRootPaneScope
- configuring and querying state at the level of the applicationJRootPane
s.RadianceComponentScope
- configuring and querying state at the level of the applicationComponent
s.RadianceComponentOrParentScope
- configuring and querying state at the level of individual applicationComponent
s or all immediate child components of a container.RadianceComponentOrParentChainScope
- configuring and querying state at the level of individual applicationComponent
s or all nested child components of a container.
Note that these are Kotlin annotations marking the extension functions on the relevant Swing classes. There is no global scope annotation as none of the RadianceThemingCortex.GlobalScope
APIs are exposed via Radiance (yet).