void (@NotNull Graphics2D g2, @NotNull Color color, int from, int to, boolean hasArrow, boolean isUsual, boolean isSelected, boolean isTerminal) { int nodeWidth = PaintParameters.getNodeWidth(getRowHeight()); if (from == to) { int y2 = getRowHeight() - (isTerminal ? PaintParameters.getCircleRadius(getRowHeight()) / 2 + 1 : 0); int y1 = getRowHeight() / 2; int x = nodeWidth * from + nodeWidth / 2; paintLine(g2, color, hasArrow, x, y1, x, y2, x, y2, isUsual, isSelected); } else { assert !isTerminal; int x1 = nodeWidth * from + nodeWidth / 2; int y1 = getRowHeight() / 2; int x2 = nodeWidth * to + nodeWidth / 2; int y2 = getRowHeight() + getRowHeight() / 2; paintLine(g2, color, hasArrow, x1, y1, x2, y2, (x1 + x2) / 2, (y1 + y2) / 2, isUsual, isSelected); } }