@Override public IntegerComponent createEditingComponent() { IntegerComponent integerComponent = new IntegerComponent(WIDTH, minimum, maximum); integerComponent.setBorder( BorderFactory.createCompoundBorder( integerComponent.getBorder(), BorderFactory.createEmptyBorder(0, 4, 0, 0))); return integerComponent; }
@Override public void setValueFromComponent(final IntegerComponent component) { final String textValue = component.getText(); try { value = Integer.parseInt(textValue); } catch (NumberFormatException e) { value = null; } }
@Override public void setValueToComponent(final IntegerComponent component, final Integer newValue) { component.setText(String.valueOf(newValue)); }