ComponentState

class ComponentState(name: String, hardFallback: ComponentState?, facetsOn: Array<ComponentStateFacet>?, facetsOff: Array<ComponentStateFacet>?)

Constructors

Link copied to clipboard
fun ComponentState(name: String, facetsOn: Array<ComponentStateFacet>?, facetsOff: Array<ComponentStateFacet>?)

Creates a new component state.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun bestFit(states: Collection<ComponentState>): ComponentState?
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun isFacetActive(stateFacet: ComponentStateFacet): Boolean

Returns indication whether this component state is "active" under the specified facet. For example, .RolloverSelected will return true for both ComponentStateFacet.Rollover and ComponentStateFacet.Selection.

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
val hardFallback: ComponentState?
Link copied to clipboard
val isActive: Boolean
Link copied to clipboard
val isDisabled: Boolean

Checks whether this state is disabled. A disabled state has ComponentStateFacet.Enable facet in its off set.