/** * Set a figure which renders this BasicCompositeFigure. The presentation * tasks for the BasicCompositeFigure are delegated to this presentation * figure. * * * * * * @param newPresentationFigure figure takes over the presentation tasks */ public void setPresentationFigure(@Nullable Figure newPresentationFigure) { if (this.presentationFigure != null) { this.presentationFigure.removeFigureListener(presentationFigureHandler); if (getDrawing() != null) { this.presentationFigure.removeNotify(getDrawing()); } } this.presentationFigure = newPresentationFigure; if (this.presentationFigure != null) { this.presentationFigure.addFigureListener(presentationFigureHandler); if (getDrawing() != null) { this.presentationFigure.addNotify(getDrawing()); } } // FIXME: We should calculate the layout here. }