@Override
    protected Node createUndecoratedEditor() {
        final boolean usesDefaultValue = value.getValue() == null || value.getValue().equals(defaultValue.getValue());

        final HBox container = new HBox();
        final CheckBox auto = new CheckBox("Auto");
        final Spinner<Integer> spinner = new Spinner<>();

        final IntegerSpinnerValueFactory svf = new SpinnerValueFactory.IntegerSpinnerValueFactory(min, max);
        spinner.setValueFactory(svf);
        spinner.disableProperty().bind(auto.selectedProperty());
        spinner.setEditable(true);

        auto.setSelected(usesDefaultValue);
        attachListener(auto.selectedProperty(), (ov, o, isAuto)
            -> setSpinnerBehaviour(svf, isAuto, defaultValue, customValue)
        );

        customValue.setValue(usesDefaultValue ? defaultValue.get() : value.get());
        setSpinnerBehaviour(svf, usesDefaultValue, defaultValue, customValue);

        final TextField editor = spinner.getEditor();
        attachListener(editor.textProperty(), (ov, oldVal, newVal) -> {
            try {
                Integer.parseInt(newVal);
            } catch (final NumberFormatException ex) {
                editor.setText(oldVal);
            }
        });

        attachListener(editor.focusedProperty(), (ov, wasFocused, isFocused) -> {
            if (wasFocused) {
                tryConstrainValueIn(editor);
            }
        });

        attachListener(svf.valueProperty(), (ov, o, n) -> {
            if (n == null || n == defaultValue.get()) {
                value.setValue(null);
            } else {
                value.setValue(n);
            }
        });

        container.getChildren().addAll(auto, spinner);
        return container;
    }
Creates a new DefaultSpinnerItem. 
<p>
While the CheckBox is checked, the Spinner will be disabled, 
and the property will always have the default value. <br>
While the CheckBox is un-checked, the Spinner will be enabled, 
and the property will always have the Spinner's current value.
<p>
Upon construction, the editor decides whether to check the default box
by comparing the property value to the default value. If they match, or
the property value is {@code null}, the CheckBox will be checked.

@param label         the label text
@param defaultValue  the default value 
@param value         the property to be edited
@param tooltip       the tooltip
@param min           the minimum spinner value
@param max           the maximum spinner value
@param decorator     the editor decorator
tool-parent/tool-propertyeditor/src/main/java/com/speedment/tool/propertyeditor/item/DefaultSpinnerItem.java