@ Override public void paint ( IReaction reaction , IDrawVisitor drawVisitor , Rectangle2D bounds , boolean resetCenter ) { // calculate the bounds Rectangle2D modelBounds = BoundsCalculator . calculateBounds ( reaction ) ; this . setupTransformToFit ( bounds , modelBounds , AverageBondLengthCalculator . calculateAverageBondLength ( reaction ) , resetCenter ) ; // generate the elements IRenderingElement diagram = this . generateDiagram ( reaction ) ; // paint it this . paint ( drawVisitor , diagram ) ; }
Paint a reaction .