code: public void setShape(Shape shape) {
      validateShape(shape);
  
      this.shape = shape;
      this.shape.calculate();
      initializeScroller();
      resetScroll();
    }
docs: Changes the Shape used to the one passed as argument. This method will refresh the view.