@Override protected void updateShape() { ShapeUtil.buildPathFromAnchors(getPath(), getControlPoints()); // call super method after shape has been updated super.updateShape(); }
@Override protected void updateShape() { getRectangularShape().setFrameFromDiagonal(topLeft.getPosition(), bottomRight.getPosition()); // call super method after shape has been updated super.updateShape(); }
@Override public void positionChanged(Anchor2D source) { // adjust dependents anchors if (source == topLeft) { bottomLeft.setX(topLeft.getX()); topRight.setY(topLeft.getY()); } else if (source == topRight) { bottomRight.setX(topRight.getX()); topLeft.setY(topRight.getY()); } else if (source == bottomLeft) { topLeft.setX(bottomLeft.getX()); bottomRight.setY(bottomLeft.getY()); } else if (source == bottomRight) { topRight.setX(bottomRight.getX()); bottomLeft.setY(bottomRight.getY()); } super.positionChanged(source); }