Examples of DefaultTableColumnModel


Examples of javax.swing.table.DefaultTableColumnModel

        // The disruptive changes will be made to it, then we reinstall
        // the desired column model when we're done.
        //    Note that we can do this only because we know that we'll
        // be replacing the TreeTableModel with another one that is
        // exactly compatible.
        treeTable.setColumnModel(new DefaultTableColumnModel());
        treeTable.setTreeTableModel(m);
        treeTable.setColumnModel(columnModel);
    }
View Full Code Here

Examples of nextapp.echo2.app.table.DefaultTableColumnModel

    public void testColumModelRendering() {
        Label label;
        DefaultTableModel model = createEmployeeTableModel();
        Table table = new Table(model);
        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());
       
        columnModel.getColumn(2).setModelIndex(1);
        columnModel.getColumn(1).setModelIndex(2);
        table.setColumnModel(columnModel);
        table.validate();
       
        // Indices should switch.
        label = (Label) table.getComponent(4);
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.