JNumberSpinner

abstract class JNumberSpinner<T : Number, Comparable<T>>(value: T, minValue: T?, maxValue: T?, stepSize: T) : JSpinner(source)

An abstract JSpinner for numbers that contains common logic for its subclasses.

Parameters

T

the type of number

value

the default value

minValue

the smallest number that may be represented, or null if there is no limit

maxValue

the largest number that may be represented, or null if there is no limit

stepSize

the default value to increment and decrement by

Inheritors

Constructors

Link copied to clipboard
constructor(value: T, minValue: T?, maxValue: T?, stepSize: T)

Types

Link copied to clipboard
object Companion

Holds constants.

Properties

Link copied to clipboard
val editorComponent: JComponent?

The component that can be used to edit the spinner.

Link copied to clipboard
abstract val numberToT: (Number) -> T

Transforms a Number into a T.

Functions

Link copied to clipboard
open override fun getValue(): T

Returns the current value of the spinner.