Пример #1
0
  private int getPrevRow() {
    if (myTable.getSelectedRows().length == 0) return -1;
    int row = myTable.getSelectionModel().getLeadSelectionIndex();

    while (true) {
      if (row <= 0) return -1;
      row--;
      DirDiffElementImpl element = myModel.getElementAt(row);
      if (element == null) return -1;
      if (!element.isSeparator()) break;
    }

    return row;
  }
Пример #2
0
 private void selectRow(int row, boolean extend) {
   if (row == -1) return;
   DirDiffElementImpl element = myModel.getElementAt(row);
   if (element == null || element.isSeparator()) return;
   myTable.changeSelection(row, (myModel.getColumnCount() - 1) / 2, false, extend);
 }