defaultEditor.getTextField().getPreferredSize(), spinner.getInsets()));
}
public void testNumberEditor_NumberEditor() {
spinner.getModel().setValue(new Integer(5));
NumberEditor numEditor = new NumberEditor(spinner);
spinner.setEditor(numEditor);
assertTrue(numEditor.getTextField().isEditable());
assertTrue(numEditor.getTextField().getFormatter() instanceof NumberFormatter);
assertEquals(numEditor.getTextField().getValue(), new Integer(5));
assertSame(((NumberFormatter) numEditor.getTextField().getFormatter()).getValueClass(),
Integer.class);
assertNull(((NumberFormatter) numEditor.getTextField().getFormatter()).getMinimum());
assertNull(((NumberFormatter) numEditor.getTextField().getFormatter()).getMaximum());
assertTrue(numEditor.getFormat().equals(new DecimalFormat()));
spinner.setModel(abstractModel);
testExceptionalCase(new IllegalArgumentCase() {
@Override
public void exceptionalAction() throws Exception {
new JSpinner.NumberEditor(spinner);