private void tryConstrainValueIn(TextField editor) {
        requireNonNull(editor);

        try {
            final int editorValue = Integer.parseInt(editor.getText());
            if (editorValue > max) {
                editor.setText(String.valueOf(max));
            } else if (editorValue < min) {
                editor.setText(String.valueOf(min));
            }
        } catch (final NumberFormatException ex) {
            throw new SpeedmentException("Unable to parse an integer from editor field", ex);
        }
    }
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