示例#1
0
    private void previousLine() {
      if (lines == null || currentLine == null) {
        return;
      }

      int index = lines.indexOf(currentLine);

      if (index == -1) {
        return;
      }

      index--;

      if (index < 0) {
        index = lines.size() - 1;
      }

      currentLine = (Line) lines.get(index);
      updateLabel();
      fireLineSelection();
    }
示例#2
0
    private void nextLine() {
      if (lines == null || currentLine == null) {
        return;
      }

      int index = lines.indexOf(currentLine);

      if (index == -1) {
        return;
      }

      index++;

      if (index >= lines.size()) {
        index = 0;
      }

      currentLine = (Line) lines.get(index);
      updateLabel();
      fireLineSelection();
    }