intellij-randomness / com.fwdekker.randomness.ui / JSpinnerRange

JSpinnerRange

class JSpinnerRange

A container for two JSpinners that indicate a range of values.

Parameters

min - the JSpinner that represents the minimum value

max - the JSpinner that represents the maximum value

maxRange - the maximum difference between min and max

name - the name used in error messages

Constructors

<init>

JSpinnerRange(min: JSpinner, max: JSpinner, name: String?)

A container for two JSpinners that indicate a range of values, using a default range.

JSpinnerRange(min: JSpinner, max: JSpinner, maxRange: Double = DEFAULT_MAX_RANGE, name: String? = null)

A container for two JSpinners that indicate a range of values.

Properties

maxValue

val maxValue: Double

The current maximum value of the range.

minValue

val minValue: Double

The current minimum value of the range.

name

val name: String

The name parameter preceded by a whitespace if it was not null, or an empty string otherwise.

Functions

validateValue

fun validateValue(): ValidationInfo?

Validates this range.