drawArrow(g, nodePos.x + halfNodeWidth, nodePos.y + nodeHeight, srcEndX, srcMidY); } else if (srcPos.y + src.getHeight() < nodePos.y) { drawArrow(g, nodePos.x + halfNodeWidth, nodePos.y, srcEndX, srcMidY); } else { drawArrow(g, nodePos.x, nodeMidY, srcEndX, srcMidY); drawArrow(g, nodePos.x + halfNodeWidth, nodePos.y + nodeHeight, srcPos.x, srcPos.y + halfNodeHeight); } else if (srcPos.y + src.getHeight() < nodePos.y) { drawArrow(g, nodePos.x + halfNodeWidth, nodePos.y, srcPos.x, srcPos.y + halfNodeHeight); } else { drawArrow(g, nodeEndX, nodeMidY, srcPos.x, srcPos.y + halfNodeHeight); drawArrow(g, nodePos.x + halfNodeWidth, nodePos.y + nodeHeight, srcPos.x + src.getHalfNodeWidth(), srcPos.y); } else { drawArrow(g, nodePos.x + halfNodeWidth, nodePos.y, srcPos.x + src.getHalfNodeWidth(), srcPos.y + src.getHeight());