Package javax.swing.JSpinner

Examples of javax.swing.JSpinner.ListEditor


    public void testListEditor_formatter() throws Exception {
        JComponent comp = new JButton();
        Object[] values = { "arrline1", "arrline2", "text", new Integer(33), comp };
        spinner.setModel(new SpinnerListModel(values));
        ListEditor listEditor = new ListEditor(spinner);
        spinner.setEditor(listEditor);
        AbstractFormatter formatter = ((ListEditor) spinner.getEditor()).getTextField()
                .getFormatter();
        assertEquals(formatter.valueToString(null), "");
        assertEquals(formatter.valueToString(new Integer(33)), "33");
View Full Code Here


    }

    public void testListEditor_ListEditor() {
        Object[] values = { "arrline1", "arrline2", "text", new Integer(33), spinner };
        spinner.setModel(new SpinnerListModel(values));
        ListEditor listEditor = new ListEditor(spinner);
        spinner.setEditor(listEditor);
        assertTrue(listEditor.getTextField().isEditable());
        spinner.setModel(abstractModel);
        testExceptionalCase(new IllegalArgumentCase() {
            @Override
            public void exceptionalAction() throws Exception {
                new JSpinner.ListEditor(spinner);
View Full Code Here

TOP

Related Classes of javax.swing.JSpinner.ListEditor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.