Example usage for javafx.scene.control Spinner Spinner

List of usage examples for javafx.scene.control Spinner Spinner

Introduction

In this page you can find the example usage for javafx.scene.control Spinner Spinner.

Prototype

public Spinner(@NamedArg("min") double min, @NamedArg("max") double max,
        @NamedArg("initialValue") double initialValue, @NamedArg("amountToStepBy") double amountToStepBy) 

Source Link

Document

Creates a Spinner instance with the #valueFactoryProperty() value factory set to be an instance of SpinnerValueFactory.DoubleSpinnerValueFactory .

Usage

From source file:de.rkl.tools.tzconv.TimezoneConverter.java

private Spinner<Integer> createMinuteSpinner() {
    final Spinner<Integer> minuteSpinner = new Spinner<>(0, 45, DEFAULT_INITIAL_MINUTE, 15);
    minuteSpinner.valueProperty().addListener((observable, oldValue, newValue) -> {
        applicationModel.mainDateTime.setValue(applicationModel.mainDateTime.getValue().withMinute(newValue));
    });//w ww .j  av  a  2  s.com
    return minuteSpinner;
}