Package javax.swing

Examples of javax.swing.DefaultListSelectionModel.insertIndexInterval()


    m.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    m.addSelectionInterval(1, 1);
    m.addSelectionInterval(7, 7);
    m.addSelectionInterval(3, 5);
    m.addListSelectionListener(this);
    m.insertIndexInterval(2, 2, true);
    harness.check(m.isSelectedIndex(0), false);
    harness.check(m.isSelectedIndex(1), true);
    harness.check(m.isSelectedIndex(2), false);
    harness.check(m.isSelectedIndex(3), false);
    harness.check(m.isSelectedIndex(4), false);
View Full Code Here


    harness.check(m.getLeadSelectionIndex(), 7);
    harness.check(lastEvent.getSource(), m);
    harness.check(lastEvent.getFirstIndex(), 3);
    harness.check(lastEvent.getLastIndex(), 9);
   
    m.insertIndexInterval(1, 2, false);
    harness.check(m.isSelectedIndex(0), false);
    harness.check(m.isSelectedIndex(1), true);
    harness.check(m.isSelectedIndex(2), true);
    harness.check(m.isSelectedIndex(3), true);
    harness.check(m.isSelectedIndex(4), false);
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.