public void invokeStep(int x, int y, int anchorX, int anchorY, DrawingView view) { Rectangle r = owner().displayBox(); owner() .displayBox( new Point(Math.min(r.x + r.width, x), Math.min(r.y + r.height, y)), new Point(r.x + r.width, r.y + r.height)); }
public Point locate() { LineConnection line = ownerConnection(); int segment = Math.min(fSegment, line.pointCount() - 2); Point p1 = line.pointAt(segment); Point p2 = line.pointAt(segment + 1); return new Point((p1.x + p2.x) / 2, (p1.y + p2.y) / 2); }