Package nextapp.echo2.app.list

Examples of nextapp.echo2.app.list.DefaultListSelectionModel.clearSelection()


        assertEquals(67, selectionModel.getMaxSelectedIndex());
        assertNotNull(changeListener.e);
        assertEquals(selectionModel, changeListener.e.getSource());
        changeListener.e = null;
       
        selectionModel.clearSelection();
        assertTrue(selectionModel.isSelectionEmpty());
        assertFalse(selectionModel.isSelectedIndex(21));
        assertFalse(selectionModel.isSelectedIndex(50));
        assertFalse(selectionModel.isSelectedIndex(67));
        assertFalse(selectionModel.isSelectedIndex(75));
View Full Code Here


        assertEquals(75, selectionModel.getMaxSelectedIndex());
        assertNotNull(changeListener.e);
        assertEquals(selectionModel, changeListener.e.getSource());
        changeListener.e = null;

        selectionModel.clearSelection();
        assertTrue(selectionModel.isSelectionEmpty());
        assertFalse(selectionModel.isSelectedIndex(50));
        assertFalse(selectionModel.isSelectedIndex(75));
        assertEquals(-1, selectionModel.getMinSelectedIndex());
        assertEquals(-1, selectionModel.getMaxSelectedIndex());
View Full Code Here

     */
    private void setSelectedIndices(int[] selectedIndices) {
        // Temporarily suppress the Tables selection event notifier.
        suppressChangeNotifications = true;
        ListSelectionModel selectionModel = getSelectionModel();
        selectionModel.clearSelection();
        for (int i = 0; i < selectedIndices.length; ++i) {
            selectionModel.setSelectedIndex(selectedIndices[i], true);
        }
        // End temporary suppression.
        suppressChangeNotifications = false;
View Full Code Here

     *
     * @param index the index
     */
    public void setSelectedIndex(int index) {
        ListSelectionModel selectionModel = getSelectionModel();
        selectionModel.clearSelection();
        selectionModel.setSelectedIndex(index, true);   
    }
   
    /**
     * Sets the selection state of the given index.
View Full Code Here

     *
     * @param indices the indices to be selected
     */
    public void setSelectedIndices(int[] indices) {
        ListSelectionModel selectionModel = getSelectionModel();
        selectionModel.clearSelection();
        for (int i = 0; i < indices.length; ++i) {
            selectionModel.setSelectedIndex(indices[i], true);
        }
    }
   
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.