/** * Sets the description of the label position. */ public void setLabelPosition(Point2D pos) { labelPosition.setLocation(pos); invalidate(); }
/** * Removes the point at position <code>index</code>. */ public void removePoint(int index) { points.remove(index); invalidate(); }
/** * Sets the point at <code>index</code> to <code>p</code>. */ public void setPoint(int index, Point2D p) { points.set(index, p); invalidate(); }
/** * Sets the description of the label position. */ public void setExtraLabelPosition(int index, Point2D pos) { extraLabelPositions[index].setLocation(pos); invalidate(); }
/** * Adds <code>p</code> at position <code>index</code>. */ public void addPoint(int index, Point2D p) { points.add(index, p); invalidate(); }
/** * Sets the <code>sourceView</code> of the edge. */ public void setSource(CellView sourceView) { sourceParentView = null; source = sourceView; if (source != null) points.set(0, source); else points.set(0, getPoint(0)); invalidate(); }
/** * Sets the <code>targetView</code> of the edge. */ public void setTarget(CellView targetView) { target = targetView; targetParentView = null; int n = points.size() - 1; if (target != null) points.set(n, target); else points.set(n, getPoint(n)); invalidate(); }
endShape = null; lineShape = null; invalidate();