@Override public void trackEnd(Point anchor, Point lead, int modifiersEx) { final BezierFigure figure = getBezierFigure(); BezierPath.Node oldValue = (BezierPath.Node) oldNode.clone(); BezierPath.Node newValue = figure.getNode(index); if ((modifiersEx & (InputEvent.META_DOWN_MASK | InputEvent.CTRL_DOWN_MASK | InputEvent.ALT_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK)) != 0) {
/** Creates a deep copy of the BezierPath. */ @Override public BezierPath clone() { BezierPath that = (BezierPath) super.clone(); for (int i = 0, n = this.size(); i < n; i++) { that.set(i, (Node) this.get(i).clone()); } return that; }
@Override public void trackEnd(Point anchor, Point lead, int modifiersEx) { final BezierFigure f = getOwner(); BezierPath.Node oldValue = (BezierPath.Node) oldNode.clone();; BezierPath.Node newValue = f.getNode(index);
/** * Sets all values of this bezier path to that bezier path, so that this * path becomes identical to that path. */ public void setTo(BezierPath that) { while (that.size() < size()) { remove(size() - 1); } for (int i = 0, n = size(); i < n; i++) { get(i).setTo(that.get(i)); } while (size() < that.size()) { add((Node) that.get(size()).clone()); } }
/** * Gets a control point. */ public BezierPath.Node getNode(int index) { return (BezierPath.Node) path.get(index).clone(); }