Package ca.odell.glazedlists.io

Examples of ca.odell.glazedlists.io.IntegerTableFormat


        ints.add(new Integer(199));
        ints.add(new Integer(199)); // should be removed by createTableCellEditor(...)
        ints.add(new Integer(10))// should be removed by createTableCellEditor(...)
        ints.add(new Integer(0));   // should be removed by createTableCellEditor(...)

        AutoCompleteSupport.AutoCompleteCellEditor editor = AutoCompleteSupport.createTableCellEditor(new IntegerTableFormat(), ints, 0);
        JComboBox comboBox = (JComboBox) editor.getComponent();
        assertSame(comboBox, editor.getAutoCompleteSupport().getComboBox());
        assertSame(ints.get(0), comboBox.getItemAt(0));
        assertSame(ints.get(1), comboBox.getItemAt(1));
        assertSame(ints.get(2), comboBox.getItemAt(2));

        editor = AutoCompleteSupport.createTableCellEditor(GlazedLists.reverseComparator(), new IntegerTableFormat(), ints, 0);
        comboBox = (JComboBox) editor.getComponent();
        assertSame(comboBox, editor.getAutoCompleteSupport().getComboBox());
        assertSame(ints.get(2), comboBox.getItemAt(0));
        assertSame(ints.get(1), comboBox.getItemAt(1));
        assertSame(ints.get(0), comboBox.getItemAt(2));
View Full Code Here


    private static final List<Color> RGB = Arrays.asList(new Color[] { Color.RED, Color.GREEN, Color.BLUE });
    private static final List<Color> RGBNull = Arrays.asList(new Color[] { Color.RED, Color.GREEN, Color.BLUE, null });

    /** Tests creation of EventTableViewer with checkable table. */
    public void guiTestConstructorWithCheckableTable() {
        EventTableViewer<Integer> viewer = new EventTableViewer<Integer>(new BasicEventList<Integer>(), new Table(getShell(), SWT.CHECK), new IntegerTableFormat());
        viewer.dispose();
    }
View Full Code Here

TOP

Related Classes of ca.odell.glazedlists.io.IntegerTableFormat

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.