@ Override public void paint ( IReactionSet reactionSet , IDrawVisitor drawVisitor , Rectangle2D bounds , boolean resetCenter ) { // total up the bounding boxes Rectangle2D totalBounds = BoundsCalculator . calculateBounds ( reactionSet ) ; this . setupTransformToFit ( bounds , totalBounds , AverageBondLengthCalculator . calculateAverageBondLength ( reactionSet ) , resetCenter ) ; ElementGroup diagram = new ElementGroup ( ) ; for ( IReaction reaction : reactionSet . reactions ( ) ) { diagram . add ( reactionRenderer . generateDiagram ( reaction ) ) ; } // paint them all this . paint ( drawVisitor , diagram ) ; }
Paint a set of reactions .