StylableProperty

interface StylableProperty<V> : Property<V>

Properties which can be styled by a theme must use this instead of a Property.

The purpose of a StylableProperty is to hold the value prior to being styled, so that it can be reverted if the property becomes un-styled.

For example, imagine we have a Label with black text, and we add a "highlight" style, which causes the text to turn bright green.

Later, when we remove the "highlight" style, the text will revert to black (using revert).

If a StylableProperty's value is set after it has been styled, the value applied by the Theme will be overwritten. removing the theme will have no effect, the new value will remain.

Inheritors

Functions

Link copied to clipboard
abstract fun kclass(): KClass<*>

Returns the Class for this Property's value, or null if bean or beanName have not been specified.

Link copied to clipboard
abstract fun revert()
Link copied to clipboard
abstract fun style(newValue: Any)