SelectorBuilder

open class SelectorBuilder<T : Any>(width: Int, values: List<T>, boxBuilder: HBoxBuilder) : FragmentBuilder<Selector<T>, SelectorBuilder<T>> , Builder<Selector<T>>

Builder for a Selector.

Constructors

SelectorBuilder
Link copied to clipboard
common
fun <T : Any> SelectorBuilder(width: Int, values: List<T>, boxBuilder: HBoxBuilder = HBoxBuilder().withSize(width, 1))

Types

Companion
Link copied to clipboard
common
object Companion

Functions

build
Link copied to clipboard
common
open override fun build(): Selector<T>
Builds an object of type T.
createCopy
Link copied to clipboard
common
open override fun createCopy(): Builder<Selector<T>>
Creates a deep copy of this object.
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
toString
Link copied to clipboard
common
open fun toString(): String
withCenteredText
Link copied to clipboard
common
fun withCenteredText(centerText: Boolean): SelectorBuilder<T>
Whether the text on the label should be centered.
withClickableLabel
Link copied to clipboard
common
fun withClickableLabel(clickable: Boolean): SelectorBuilder<T>
When set to true the center component, showing the text, will be an undecorated button that also invokes the callback (else it is just a simple label).
withDefaultSelected
Link copied to clipboard
common
fun withDefaultSelected(item: T): SelectorBuilder<T>
withPosition
Link copied to clipboard
common
override fun withPosition(position: Position): SelectorBuilder<T>
Aligns the resulting Component positionally, relative to its parent.
override fun withPosition(x: Int, y: Int): SelectorBuilder<T>
Aligns the resulting Component positionally, relative to its parent.
withToStringMethod
Link copied to clipboard
common
fun withToStringMethod(function: (T) -> String): SelectorBuilder<T>
The method to use for the label text if not ::toString

Properties

values
Link copied to clipboard
common
val values: List<T>
width
Link copied to clipboard
common
val width: Int

Inheritors

ColorThemeSelectorBuilder
Link copied to clipboard
TilesetSelectorBuilder
Link copied to clipboard

Sources

(source)
Link copied to clipboard