spinButton

fun <T, M : SpinButtonModel<T>> spinButton(model: M, itemVisualizer: ItemVisualizer<T, SpinButton<T, M>> = toString(StringVisualizer()), config: (SpinButton<T, M>) -> Unit = {}): FieldVisualizer<T>(source)

Creates a SpinButton control that is bound to a Field. This control lets a user select a single item within a list. It is similar to radioList, except it DOES set a default value and its field is therefore ALWAYS Valid.

This control is useful when a meaningful default exists for an option list.

Parameters

T

is the type of the bounded field

model

for the select box

itemVisualizer

used to render the spin-button's box item

config

used to control the resulting component


fun <T> spinButton(first: T, vararg rest: T, itemVisualizer: ItemVisualizer<T, SpinButton<T, *>>, config: (SpinButton<T, *>) -> Unit = {}): FieldVisualizer<T>(source)

Creates a SpinButton control that is bound to a Field. This control lets a user select a single item within a list. It is similar to radioList, except it DOES set a default value and its field is therefore ALWAYS Valid.

This control is useful when a meaningful default exists for an option list.

Parameters

T

is the type of the bounded field

first

item in the list

rest

of the items in the list

itemVisualizer

used to render the spin-button's box item

config

used to control the resulting component


fun <T> spinButton(values: List<T>, itemVisualizer: ItemVisualizer<T, SpinButton<T, *>>, config: (SpinButton<T, *>) -> Unit = {}): FieldVisualizer<T>(source)

Creates a SpinButton control that is bound to a Field. This control lets a user select a single item within a list. It is similar to radioList, except it DOES set a default value and its field is therefore ALWAYS Valid.

This control is useful when a meaningful default exists for an option list.

Parameters

T

is the type of the bounded field

values

in the spin-button

itemVisualizer

used to render the spin-button's box item

config

used to control the resulting component


fun <T> spinButton(first: T, vararg rest: T, label: (T) -> String = { "$it" }, config: (SpinButton<T, *>) -> Unit = {}): FieldVisualizer<T>(source)

Creates a SpinButton control that is bound to a Field. This control lets a user select a single item within a list. It is similar to radioList, except it DOES set a default value and its field is therefore ALWAYS Valid.

This control is useful when a meaningful default exists for an option list.

Parameters

T

is the type of the bounded field

first

item in the list

rest

of the items in the list

label

used to render the spin-button's box and list items

config

used to control the resulting component


fun <T> spinButton(values: List<T>, label: (T) -> String = { "$it" }, config: (SpinButton<T, *>) -> Unit = {}): FieldVisualizer<T>(source)

Creates a SpinButton control that is bound to a Field. This control lets a user select a single item within a list. It is similar to radioList, except it DOES set a default value and its field is therefore ALWAYS Valid.

This control is useful when a meaningful default exists for an option list.

Parameters

T

is the type of the bounded field

values

in the spin-button

label

used to render the spin-button's box and list items

config

used to control the resulting component


fun spinButton(progression: IntProgression, itemVisualizer: ItemVisualizer<Int, SpinButton<Int, *>>, config: (SpinButton<Int, *>) -> Unit = {}): FieldVisualizer<Int>(source)

Creates a SpinButton control that is bound to a Field. This control lets a user select a single item within a list. It is similar to radioList, except it DOES set a default value and its field is therefore ALWAYS Valid.

This control is useful when a meaningful default exists for an option list.

Parameters

progression

to use for the underlying model

itemVisualizer

used to render the spin-button's box item

config

used to control the resulting component


fun spinButton(progression: IntProgression, label: (Int) -> String = { "$it" }, config: (SpinButton<Int, *>) -> Unit = {}): FieldVisualizer<Int>(source)

Creates a SpinButton control that is bound to a Field. This control lets a user select a single item within a list. It is similar to radioList, except it DOES set a default value and its field is therefore ALWAYS Valid.

This control is useful when a meaningful default exists for an option list.

Parameters

progression

to use for the underlying model

label

used to render the spin-button's box and list items

config

used to control the resulting component