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(); }
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(); }