< prev index next >

## src/java.desktop/share/classes/javax/swing/DefaultListSelectionModel.java

Print this page

    *** 689,710 ****
              for(int i = rmMinIndex; i <= maxIndex; i++) {
                  setState(i, value.get(i + gapLength));
              }

              int leadIndex = this.leadIndex;
    !         if (leadIndex == 0 && rmMinIndex == 0) {
    !             // do nothing
    !         } else if (leadIndex > rmMaxIndex) {
                  leadIndex = this.leadIndex - gapLength;
              } else if (leadIndex >= rmMinIndex) {
                  leadIndex = rmMinIndex - 1;
              }

              int anchorIndex = this.anchorIndex;
    !         if (anchorIndex == 0 && rmMinIndex == 0) {
    !             // do nothing
    !         } else if (anchorIndex > rmMaxIndex) {
                  anchorIndex = this.anchorIndex - gapLength;
              } else if (anchorIndex >= rmMinIndex) {
                  anchorIndex = rmMinIndex - 1;
              }

    --- 689,706 ----
              for(int i = rmMinIndex; i <= maxIndex; i++) {
                  setState(i, value.get(i + gapLength));
              }

              int leadIndex = this.leadIndex;
    !         if (leadIndex > rmMaxIndex) {
                  leadIndex = this.leadIndex - gapLength;
              } else if (leadIndex >= rmMinIndex) {
                  leadIndex = rmMinIndex - 1;
              }

              int anchorIndex = this.anchorIndex;
    !         if (anchorIndex > rmMaxIndex) {
                  anchorIndex = this.anchorIndex - gapLength;
              } else if (anchorIndex >= rmMinIndex) {
                  anchorIndex = rmMinIndex - 1;
              }

< prev index next >