Examples of clearSelection()


Examples of javax.swing.DefaultListSelectionModel.clearSelection()

    harness.check(lastEvent, null);
   
    harness.checkPoint("SINGLE_SELECTION (2)");
    m.setSelectionInterval(3, 3);
    lastEvent = null;
    m.clearSelection();
    harness.check(m.isSelectionEmpty());
    harness.check(m.getAnchorSelectionIndex(), 3);
    harness.check(m.getLeadSelectionIndex(), 3);
    harness.check(lastEvent.getSource(), m);
    harness.check(lastEvent.getFirstIndex(), 3);
View Full Code Here

Examples of javax.swing.DefaultListSelectionModel.clearSelection()

    DefaultListSelectionModel m = new DefaultListSelectionModel();
    m.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
    m.addListSelectionListener(this);
    harness.check(m.isSelectionEmpty(), true);
    lastEvent = null;
    m.clearSelection();
    harness.check(m.isSelectionEmpty(), true);
    harness.check(lastEvent, null);
   
    // check 2 : clearing a selection generates an event with first and last
    // indices covering the former selection
View Full Code Here

Examples of javax.swing.DefaultListSelectionModel.clearSelection()

    // check 2 : clearing a selection generates an event with first and last
    // indices covering the former selection
    harness.checkPoint("SINGLE_INTERVAL_SELECTION (2)");
    m.addSelectionInterval(10, 20);
    lastEvent = null;
    m.clearSelection();
    harness.check(m.isSelectionEmpty(), true);
    harness.check(m.isSelectedIndex(10), false);
    harness.check(m.getAnchorSelectionIndex(), 10);
    harness.check(m.getLeadSelectionIndex(), 20);
    harness.check(m.getMinSelectionIndex(), -1);
View Full Code Here

Examples of javax.swing.DefaultListSelectionModel.clearSelection()

    DefaultListSelectionModel m = new DefaultListSelectionModel();
    m.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    m.addListSelectionListener(this);
    harness.check(m.isSelectionEmpty(), true);
    lastEvent = null;
    m.clearSelection();
    harness.check(m.isSelectionEmpty(), true);
    harness.check(lastEvent, null);
   
    // check 2 : clearing a selection generates an event with first and last
    // indices covering the former selection
View Full Code Here

Examples of javax.swing.DefaultListSelectionModel.clearSelection()

    // indices covering the former selection
    harness.checkPoint("MULTIPLE_INTERVAL_SELECTION (2)");
    m.addSelectionInterval(2, 3);
    m.addSelectionInterval(12, 13);
    lastEvent = null;
    m.clearSelection();
    harness.check(m.isSelectionEmpty(), true);
    harness.check(m.getAnchorSelectionIndex(), 12);
    harness.check(m.getLeadSelectionIndex(), 13);
    harness.check(m.getMinSelectionIndex(), -1);
    harness.check(m.getMaxSelectionIndex(), -1);
View Full Code Here

Examples of javax.swing.DefaultListSelectionModel.clearSelection()

    harness.check(m.getLeadSelectionIndex(), -1);
    m.setAnchorSelectionIndex(1);
    m.setLeadSelectionIndex(3);
    harness.check(m.getLeadSelectionIndex(), 3);
   
    m.clearSelection();
    harness.check(m.getLeadSelectionIndex(), 3);
   
    m.addSelectionInterval(15, 11);
    harness.check(m.getLeadSelectionIndex(), 11);
  }
View Full Code Here

Examples of javax.swing.DefaultListSelectionModel.clearSelection()

  {
    DefaultListSelectionModel m = new DefaultListSelectionModel();
    harness.check(m.getAnchorSelectionIndex(), -1);
    m.setAnchorSelectionIndex(99);
    harness.check(m.getAnchorSelectionIndex(), 99);
    m.clearSelection();
    harness.check(m.getAnchorSelectionIndex(), 99);
    m.addSelectionInterval(15, 11);
    harness.check(m.getAnchorSelectionIndex(), 15);
  }
}
View Full Code Here

Examples of javax.swing.DefaultListSelectionModel.clearSelection()

  {
    DefaultListSelectionModel m = new DefaultListSelectionModel();
    harness.check(m.getMaxSelectionIndex(), -1);
    m.addSelectionInterval(99, 101);
    harness.check(m.getMaxSelectionIndex(), 101);
    m.clearSelection();
    harness.check(m.getMaxSelectionIndex(), -1);
  }
}
View Full Code Here

Examples of javax.swing.JList.clearSelection()

      final int[] selectedEntries = enumEntryList.getSelectedIndices();
      for (int i = selectedEntries.length - 1; i >= 0; i--)
      {
        enumEntryListModel.remove(selectedEntries[i]);
      }
      enumEntryList.clearSelection();
    }
  }

  /**
   * Handles the request to update an enumeration entry to the detail editor.
View Full Code Here

Examples of javax.swing.JList.clearSelection()

      list.repaint();
    }
    else if (owner instanceof JTree)
    {
      final JTree list = (JTree) owner;
      list.clearSelection();
      list.repaint();
    }
    else
    {
      final ReportDocumentContext activeContext = getActiveContext();
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.