Package javax.swing.table

Examples of javax.swing.table.DefaultTableColumnModel.removeColumn()


        assertEquals(eventModel2, defaultModel);
        assertEquals(eventModel1, eventModel2);
        assertEquals(3, nameColumn.getPropertyChangeListeners().length);

        columns.remove(0);
        defaultModel.removeColumn(nameColumn);
        eventModel2.removeColumn(nameColumn);
        assertEquals(eventModel1, defaultModel);
        assertEquals(eventModel2, defaultModel);
        assertEquals(eventModel1, eventModel2);
        assertEquals(0, nameColumn.getPropertyChangeListeners().length);
View Full Code Here


        assertEquals(3, nameColumn.getPropertyChangeListeners().length);

        // move the column at index 0 to index 1
        columns.remove(0);
        columns.add(nameColumn);
        defaultModel.removeColumn(nameColumn);
        defaultModel.addColumn(nameColumn);
        eventModel2.moveColumn(0, 1);
        assertEquals(eventModel1, defaultModel);
        assertEquals(eventModel2, defaultModel);
        assertEquals(eventModel1, eventModel2);
View Full Code Here

    TableColumn c2 = new TableColumn(2, 45);
    m1.addColumn(c0);
    m1.addColumn(c1);
    m1.addColumn(c2);

    m1.removeColumn(c1);
    harness.check(m1.getColumnCount(), 2);
    harness.check(c1.getPropertyChangeListeners().length, 0);
   
    // remove a column that isn't there
    TableColumn c3 = new TableColumn(3, 99);
View Full Code Here

    harness.check(m1.getColumnCount(), 2);
    harness.check(c1.getPropertyChangeListeners().length, 0);
   
    // remove a column that isn't there
    TableColumn c3 = new TableColumn(3, 99);
    m1.removeColumn(c3);
    harness.check(m1.getColumnCount(), 2);

    // remove a null column
    m1.removeColumn(null);
    harness.check(m1.getColumnCount(), 2);
View Full Code Here

    TableColumn c3 = new TableColumn(3, 99);
    m1.removeColumn(c3);
    harness.check(m1.getColumnCount(), 2);

    // remove a null column
    m1.removeColumn(null);
    harness.check(m1.getColumnCount(), 2);
    // check that removing a column sends the correct event
    MyListener listener = new MyListener();
    m1.addColumnModelListener(listener);
View Full Code Here

    harness.check(m1.getColumnCount(), 2);
    // check that removing a column sends the correct event
    MyListener listener = new MyListener();
    m1.addColumnModelListener(listener);
    m1.removeColumn(c0);
    harness.check(listener.getEvent() != null);
    harness.check(listener.getEvent().getFromIndex(), 0);
    harness.check(listener.getEvent().getToIndex(), 0);
  }
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.