void (@NotNull Graphics2D g2, @NotNull Color color, boolean hasArrow, int x1, int y1, int x2, int y2, int startArrowX, int startArrowY, boolean isUsual, boolean isSelected) { g2.setColor(color); if (isUsual || hasArrow) { setUsualStroke(g2, isSelected); } else { setDashedStroke(g2, isSelected, (x1 == x2) ? getRowHeight() : Math.hypot(x1 - x2, y1 - y2)); } g2.drawLine(x1, y1, x2, y2); if (hasArrow) { Pair<Integer, Integer> rotate1 = rotate(x1, y1, startArrowX, startArrowY, Math.sqrt(ARROW_ANGLE_COS2), Math.sqrt(1 - ARROW_ANGLE_COS2), ARROW_LENGTH * getRowHeight()); Pair<Integer, Integer> rotate2 = rotate(x1, y1, startArrowX, startArrowY, Math.sqrt(ARROW_ANGLE_COS2), -Math.sqrt(1 - ARROW_ANGLE_COS2), ARROW_LENGTH * getRowHeight()); g2.drawLine(startArrowX, startArrowY, rotate1.first, rotate1.second); g2.drawLine(startArrowX, startArrowY, rotate2.first, rotate2.second); } }