if (shape != null) { Rectangle2D r = shape.getFrame(); originalWidth = (r.getWidth() > 0 ? r.getWidth() : originalWidth); originalHeight = (r.getHeight() > 0 ? r.getHeight() : originalHeight); }
    public void setShapePrototype(RectangularShape shape) {        this.shapePrototype = shape;    }