@ Override public void setScale ( IReaction reaction ) { double bondLength = AverageBondLengthCalculator . calculateAverageBondLength ( reaction ) ; double scale = this . calculateScaleForBondLength ( bondLength ) ; // store the scale so that other components can access it this . rendererModel . getParameter ( Scale . class ) . setValue ( scale ) ; }
Set the scale for an IReaction . It calculates the average bond length of the model and calculates the multiplication factor to transform this to the bond length that is set in the RendererModel .