abstract class JNumberSpinner<T> : JSpinner where T : Number, T : Comparable<T>
An abstract JSpinner for numbers that contains common logic for its subclasses.
minValue
- the smallest number that may be represented
maxValue
- the largest number that may be represented
stepSize
- the default value to increment and decrement by
description
- the description to use in error messages; defaults to DEFAULT_DESCRIPTION if null
is given
JNumberSpinner(value: T, minValue: T, maxValue: T, stepSize: T, description: String? = null)
An abstract JSpinner for numbers that contains common logic for its subclasses. |
var maxValue: T
The maximal allowed value. |
|
var minValue: T
The minimal allowed value. |
|
abstract val numberToT: (Number) -> T
|
open fun getValue(): T
Returns the current value of the spinner. |
|
open fun setValue(value: Any): Unit
Sets the value of the spinner. |
|
fun validateValue(): ValidationInfo?
Validates the current value. |
const val DEFAULT_DESCRIPTION: String
The default description to use in error messages. |
|
val DEFAULT_FORMAT: DecimalFormatSymbols
The default number format used to display numbers. |
|
const val DEFAULT_WIDTH: Int
The default width of a number spinner. |
class JDoubleSpinner : JNumberSpinner<Double>
A JNumberSpinner for doubles. |
|
class JIntSpinner : JNumberSpinner<Int>
A JNumberSpinner for integers. |
|
class JLongSpinner : JNumberSpinner<Long>
A JNumberSpinner for longs. |