class ConfigurationContext extends GraphicalContext<BorderPane> {

    static Spinner<Double> buildSpinner(
        double min,
        double max,
        double initialValue,
        double step,
        Property<Number> configProperty
    ) {
        Spinner<Double> spinner = new Spinner<>(min, max, initialValue, step);
        spinner.setEditable(true);
        spinner.setPrefWidth(PREF_WIDTH);
        spinner.setPrefHeight(PREF_HEIGHT);

        spinner.valueProperty().addListener((observable, oldValue, newValue) -> {
            if (newValue >= min || newValue <= max) {
                final int newPropertyValue = (int) (1000 * spinner.getValue());
                configProperty.setValue(newPropertyValue);
            } else if (newValue > max) {
                final int newPropertyValue = (int) (1000 * max);
                configProperty.setValue(newPropertyValue);
            } else if (newValue < min) {
                final int newPropertyValue = (int) (1000 * min);
                configProperty.setValue(newPropertyValue);
            }
        });

        return spinner;
    }

      ConfigurationContext(GazePlay gazePlay);

}