Package nextapp.echo2.app

Examples of nextapp.echo2.app.Table.validate()


        DefaultTableColumnModel columnModel = (DefaultTableColumnModel) table.getColumnModel();
        assertEquals(0, columnModel.getColumn(0).getModelIndex());
        assertEquals(1, columnModel.getColumn(1).getModelIndex());
        assertEquals(2, columnModel.getColumn(2).getModelIndex());
        table.setAutoCreateColumnsFromModel(false);
        table.validate();
       
        label = (Label) table.getComponent(4);
        assertEquals("32", label.getText());
        label = (Label) table.getComponent(5);
        assertEquals("true", label.getText());
View Full Code Here


        assertEquals("true", label.getText());
       
        columnModel.getColumn(2).setModelIndex(1);
        columnModel.getColumn(1).setModelIndex(2);
        table.setColumnModel(columnModel);
        table.validate();
       
        // Indices should switch.
        label = (Label) table.getComponent(4);
        assertEquals("true", label.getText());
        label = (Label) table.getComponent(5);
View Full Code Here

        model.insertRow(0, new Object[]{"Bob Johnson", new Integer(32), Boolean.TRUE});
        model.insertRow(1, new Object[]{"Bill Simmons", new Integer(27), Boolean.TRUE});
        model.insertRow(2, new Object[]{"Tracy Smith", new Integer(54), Boolean.TRUE});
        model.insertRow(3, new Object[]{"Cathy Rogers", new Integer(21), Boolean.FALSE});
        model.insertRow(4, new Object[]{"Xavier Doe", new Integer(77), Boolean.TRUE});
        table.validate();
        assertEquals(18, table.getComponentCount());
        Component[] components = table.getComponents();
        for (int i = 3; i < components.length; ++i) {
            if (i % 3 == 2) {
                assertEquals(CheckBox.class, components[i].getClass());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.