/** * Returns the distance between the start and end in viewport coordinates * * @return */ public Point2D getDistanceAdjusted() { return getEventAdjusted().minus(getStartAdjusted()); }
/** * Returns the distance between the start and end in viewport coordinates * * @return */ public Point2D getDistanceAdjusted() { return getEventAdjusted().minus(getStartAdjusted()); }
/** * Returns the distance between the start and end in viewport coordinates * * @return */ public Point2D getDistanceAdjusted() { return getEventAdjusted().minus(getStartAdjusted()); }
@Override public void onStart(final IAnimation iAnimation, final IAnimationHandle iAnimationHandle) { //Store required transformations: Control, Current location, Target location transformations.clear(); for (int index = 0; index < controls.size(); index++) { final Group ctrl = controls.get(index); final Point2D origin = ctrl.getLocation(); origin.minus(WiresBaseShape.this.getLocation()); final Point2D target = new Point2D(0, 0); transformations.put(ctrl, new Pair<Point2D, Point2D>(origin, target)); } }
@Override public void onStart(final IAnimation iAnimation, final IAnimationHandle iAnimationHandle) { //Store required transformations: Control, Current location, Target location transformations.clear(); for (int index = 0; index < controls.size(); index++) { final Group ctrl = controls.get(index); final Point2D origin = ctrl.getLocation(); origin.minus(WiresBaseShape.this.getLocation()); final Point2D target = new Point2D(0, 0); transformations.put(ctrl, new Pair<Point2D, Point2D>(origin, target)); } }
public static Point2D calculateCandidateLocation(final WiresParentPickerControlImpl parentPickerControl) { final WiresLayer layer = parentPickerControl.getShape().getWiresManager().getLayer(); final WiresContainer parent = parentPickerControl.getParent(); final Point2D current = parentPickerControl.getShapeLocation(); if ((parent == null) || (parent == layer)) { return current; } else { final Point2D trgAbsOffset = parent.getComputedLocation(); return current.minus(trgAbsOffset); } }
public static Point2D calculateCandidateLocation(final WiresParentPickerControlImpl parentPickerControl) { final WiresLayer layer = parentPickerControl.getShape().getWiresManager().getLayer(); final WiresContainer parent = parentPickerControl.getParent(); final Point2D current = parentPickerControl.getShapeLocation(); if ((parent == null) || (parent == layer)) { return current; } else { final Point2D trgAbsOffset = parent.getComputedLocation(); return current.minus(trgAbsOffset); } }
public static Point2D calculateCandidateLocation(final WiresParentPickerControlImpl parentPickerControl) { final WiresLayer layer = parentPickerControl.getShape().getWiresManager().getLayer(); final WiresContainer parent = parentPickerControl.getParent(); final Point2D current = parentPickerControl.getShapeLocation(); if ((parent == null) || (parent == layer)) { return current; } else { final Point2D trgAbsOffset = parent.getComputedLocation(); return current.minus(trgAbsOffset); } }
private Point2D getCandidateShapeLocationRelativeToInitialParent(final WiresShape shape) { final Point2D candidate = shape.getControl().getContainmentControl().getCandidateLocation(); final WiresParentPickerControlImpl parentPickerControl = (WiresParentPickerControlImpl) shape.getControl().getParentPickerControl(); final Point2D io = null != parentPickerControl.getInitialParent() ? parentPickerControl.getInitialParent().getComputedLocation() : new Point2D(0, 0); final Point2D co = null != parentPickerControl.getParent() ? parentPickerControl.getParent().getComputedLocation() : new Point2D(0, 0); return co.add(candidate).minus(io); }
private Point2D getCandidateShapeLocationRelativeToInitialParent(final WiresShape shape) { final Point2D candidate = shape.getControl().getContainmentControl().getCandidateLocation(); final WiresParentPickerControlImpl parentPickerControl = (WiresParentPickerControlImpl) shape.getControl().getParentPickerControl(); final Point2D io = null != parentPickerControl.getInitialParent() ? parentPickerControl.getInitialParent().getComputedLocation() : new Point2D(0, 0); final Point2D co = null != parentPickerControl.getParent() ? parentPickerControl.getParent().getComputedLocation() : new Point2D(0, 0); return co.add(candidate).minus(io); }
private Point2D getCandidateShapeLocationRelativeToInitialParent(final WiresShape shape) { final Point2D candidate = shape.getControl().getContainmentControl().getCandidateLocation(); final WiresParentPickerControlImpl parentPickerControl = (WiresParentPickerControlImpl) shape.getControl().getParentPickerControl(); final Point2D io = null != parentPickerControl.getInitialParent() ? parentPickerControl.getInitialParent().getComputedLocation() : new Point2D(0, 0); final Point2D co = null != parentPickerControl.getParent() ? parentPickerControl.getParent().getComputedLocation() : new Point2D(0, 0); return co.add(candidate).minus(io); }