Package javax.swing

Examples of javax.swing.DefaultListSelectionModel.removeSelectionInterval()


    m.addSelectionInterval(1, 2);
    harness.check(m.isSelectedIndex(1), false);
    harness.check(m.isSelectedIndex(2), true);
    harness.check(m.isSelectedIndex(3), false);
    m.addListSelectionListener(this);
    m.removeSelectionInterval(2, 3);
    harness.check(m.isSelectionEmpty(), true);
   
    harness.check(lastEvent.getSource(), m);
    harness.check(lastEvent.getFirstIndex(), 2);
    harness.check(lastEvent.getLastIndex(), 3);
View Full Code Here


    harness.check(m.isSelectedIndex(4), true);
    harness.check(m.isSelectedIndex(5), true);
    harness.check(m.isSelectedIndex(6), true);
    harness.check(m.isSelectedIndex(7), false);
    m.addListSelectionListener(this);
    m.removeSelectionInterval(3, 5);
    harness.check(m.isSelectedIndex(1), false);
    harness.check(m.isSelectedIndex(2), true);
    harness.check(m.isSelectedIndex(3), false);
    harness.check(m.isSelectedIndex(4), false);
    harness.check(m.isSelectedIndex(5), false);
View Full Code Here

    harness.check(m.isSelectedIndex(4), true);
    harness.check(m.isSelectedIndex(5), true);
    harness.check(m.isSelectedIndex(6), true);
    harness.check(m.isSelectedIndex(7), false);
    m.addListSelectionListener(this);
    m.removeSelectionInterval(3, 5);
    harness.check(m.isSelectedIndex(1), false);
    harness.check(m.isSelectedIndex(2), true);
    harness.check(m.isSelectedIndex(3), false);
    harness.check(m.isSelectedIndex(4), false);
    harness.check(m.isSelectedIndex(5), 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.