Slider

interface Slider : Component

A Slider is a Component that can be used to select values from a range of numbers with a visual sliding mechanism.

Functions

acceptsFocus
Link copied to clipboard
common
abstract fun acceptsFocus(): Boolean
Tells whether this Focusable accepts focus right now.
asInternalComponent
Link copied to clipboard
common
abstract fun asInternalComponent(): InternalComponent
Returns this Component as an InternalComponent which represents the internal API of Component.
clearCustomStyle
Link copied to clipboard
common
abstract fun clearCustomStyle()
Clears any custom componentStyleSet (if present).
clearFocus
Link copied to clipboard
common
abstract fun clearFocus()
Clears focus from this Focusable.
containsBoundable
Link copied to clipboard
common
abstract infix fun containsBoundable(boundable: Boundable): Boolean
Tells whether this boundable contains the other boundable.
containsPosition
Link copied to clipboard
common
abstract infix fun containsPosition(position: Position): Boolean
Tells whether position is within this boundable's bounds.
decrementCurrentStep
Link copied to clipboard
common
abstract fun decrementCurrentStep()
decrementCurrentValue
Link copied to clipboard
common
abstract fun decrementCurrentValue()
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
handleComponentEvents
Link copied to clipboard
common
abstract fun handleComponentEvents(eventType: ComponentEventType, handler: (event: ComponentEvent) -> UIEventResponse): Subscription
Adds the given handler for ComponentEvents.
handleKeyboardEvents
Link copied to clipboard
common
abstract fun handleKeyboardEvents(eventType: KeyboardEventType, handler: (event: KeyboardEvent, phase: UIEventPhase) -> UIEventResponse): Subscription
Adds the given handler for keyboard events.
handleMouseEvents
Link copied to clipboard
common
abstract fun handleMouseEvents(eventType: MouseEventType, handler: (event: MouseEvent, phase: UIEventPhase) -> UIEventResponse): Subscription
Adds the given handler for mouse events.
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
incrementCurrentStep
Link copied to clipboard
common
abstract fun incrementCurrentStep()
incrementCurrentValue
Link copied to clipboard
common
abstract fun incrementCurrentValue()
intersects
Link copied to clipboard
common
abstract infix fun intersects(boundable: Boundable): Boolean
Tells whether this Boundable intersects with the other boundable.
moveBy
Link copied to clipboard
common
open fun moveBy(position: Position): Boolean
Moves this Movable relative to its current position by the given position.
moveDownBy
Link copied to clipboard
common
open fun moveDownBy(delta: Int): Boolean
moveLeftBy
Link copied to clipboard
common
open fun moveLeftBy(delta: Int): Boolean
moveRightBy
Link copied to clipboard
common
open fun moveRightBy(delta: Int): Boolean
moveTo
Link copied to clipboard
common
abstract fun moveTo(position: Position): Boolean
Sets the position of this Movable.
moveUpBy
Link copied to clipboard
common
open fun moveUpBy(delta: Int): Boolean
onActivated
Link copied to clipboard
common
abstract fun onActivated(fn: (ComponentEvent) -> Unit): Subscription
Adds a listener to this Component that will be called whenever this Component is activated.
onDeactivated
Link copied to clipboard
common
abstract fun onDeactivated(fn: (ComponentEvent) -> Unit): Subscription
Adds a listener to this Component that will be called whenever this Component is deactivated.
onFocusGiven
Link copied to clipboard
common
abstract fun onFocusGiven(fn: (ComponentEvent) -> Unit): Subscription
Adds a listener to this Component that will be called whenever this Component gains focus.
onFocusTaken
Link copied to clipboard
common
abstract fun onFocusTaken(fn: (ComponentEvent) -> Unit): Subscription
Adds a listener to this Component that will be called whenever this Component loses focus.
onStepChange
Link copied to clipboard
common
abstract fun onStepChange(fn: (ObservableValueChanged<Int>) -> Unit): Subscription
Callback called when step changes
onValueChange
Link copied to clipboard
common
abstract fun onValueChange(fn: (ObservableValueChanged<Int>) -> Unit): Subscription
Callback called when value changes
processComponentEvents
Link copied to clipboard
common
abstract fun processComponentEvents(eventType: ComponentEventType, handler: (event: ComponentEvent) -> Unit): Subscription
Adds the given handler for ComponentEvents.
processKeyboardEvents
Link copied to clipboard
common
abstract fun processKeyboardEvents(eventType: KeyboardEventType, handler: (event: KeyboardEvent, phase: UIEventPhase) -> Unit): Subscription
Adds the given handler for KeyboardEvents.
processMouseEvents
Link copied to clipboard
common
abstract fun processMouseEvents(eventType: MouseEventType, handler: (event: MouseEvent, phase: UIEventPhase) -> Unit): Subscription
Adds the given handler for MouseEvents.
requestFocus
Link copied to clipboard
common
abstract fun requestFocus(): Boolean
Requests focus for this Focusable.
resetState
Link copied to clipboard
common
abstract fun resetState()
toString
Link copied to clipboard
common
open fun toString(): String

Properties

absolutePosition
Link copied to clipboard
common
abstract val absolutePosition: Position
The absolute position of this Component, eg: the Position relative to the top left corner of the grid it is displayed on.
componentState
Link copied to clipboard
common
abstract val componentState: ComponentState
componentStateValue
Link copied to clipboard
common
abstract val componentStateValue: ObservableValue<ComponentState>
componentStyleSet
Link copied to clipboard
common
abstract var componentStyleSet: ComponentStyleSet
componentStyleSetProperty
Link copied to clipboard
common
abstract val componentStyleSetProperty: Property<out ComponentStyleSet>
contentOffset
Link copied to clipboard
common
abstract val contentOffset: Position
The position of the top left corner of the content area (where the component is rendered without the decorations) relative to the top left corner of this Component.
contentSize
Link copied to clipboard
common
abstract val contentSize: Size
The Size of the content of this Component.
currentStep
Link copied to clipboard
common
abstract var currentStep: Int
Current step with respect to the number of steps
currentStepProperty
Link copied to clipboard
common
abstract val currentStepProperty: Property<Int>
Bindable, current step
currentStyle
Link copied to clipboard
common
open val currentStyle: StyleSet
The current style based on componentStyleSet according to the current componentState.
currentValue
Link copied to clipboard
common
abstract var currentValue: Int
Current value with respect to the maxValue
currentValueProperty
Link copied to clipboard
common
abstract val currentValueProperty: Property<Int>
Bindable, current value
disabledProperty
Link copied to clipboard
common
abstract override val disabledProperty: Property<Boolean>
hasFocus
Link copied to clipboard
common
abstract val hasFocus: Boolean
Tells whether this Focusable has focus or not.
hasFocusValue
Link copied to clipboard
common
abstract val hasFocusValue: ObservableValue<Boolean>
height
Link copied to clipboard
common
open override val height: Int
hiddenProperty
Link copied to clipboard
common
abstract override val hiddenProperty: Property<Boolean>
id
Link copied to clipboard
common
abstract val id: UUID
isDisabled
Link copied to clipboard
common
abstract override var isDisabled: Boolean
isHidden
Link copied to clipboard
common
abstract override var isHidden: Boolean
maxValue
Link copied to clipboard
common
abstract val maxValue: Int
Maximum value of the Slider
minValue
Link copied to clipboard
common
abstract val minValue: Int
Minimum value of the Slider
numberOfSteps
Link copied to clipboard
common
abstract val numberOfSteps: Int
Number of visible steps
position
Link copied to clipboard
common
open val position: Position
Shorthand for Rect.position
rect
Link copied to clipboard
common
abstract val rect: Rect
A Rect contains the coordinates and the size of a Boundable.
rectValue
Link copied to clipboard
common
abstract val rectValue: ObservableValue<Rect>
Observable value that can be used to observe the changes of rect.
relativeBounds
Link copied to clipboard
common
abstract val relativeBounds: Rect
The bounds of this Component relative to its parent.
relativePosition
Link copied to clipboard
common
abstract val relativePosition: Position
The relative position is the position of the top left corner of this Component relative to the contentOffset of its parent.
size
Link copied to clipboard
common
abstract override val size: Size
theme
Link copied to clipboard
common
abstract override var theme: ColorTheme
The (mutable) ColorTheme.
themeProperty
Link copied to clipboard
common
abstract override val themeProperty: Property<ColorTheme>
A Property that wraps the theme and offers data binding and observability features.
tileset
Link copied to clipboard
common
abstract override var tileset: TilesetResource
The (mutable) tileset value.
tilesetProperty
Link copied to clipboard
common
abstract val tilesetProperty: Property<TilesetResource>
A Property that wraps the tileset and offers data binding and observability features.
width
Link copied to clipboard
common
open override val width: Int
x
Link copied to clipboard
common
open val x: Int
Shorthand for Rect.x
y
Link copied to clipboard
common
open val y: Int
Shorthand for Rect.y

Inheritors

BaseSlider
Link copied to clipboard

Sources

(source)
Link copied to clipboard