test_class.declarator: generator
test_class.modifier: private
test_class.original_string: private MappingGenerator generator;
test_class.type: MappingGenerator
test_class.var_name: generator
test_class.file: display/renderextra/src/test/java/org/openscience/cdk/renderer/generators/MappingGeneratorTest.java
test_class.identifier: MappingGeneratorTest
test_class.superclass: extends AbstractGeneratorTest
test_case.body: @Test
      public void testEmptyReaction() {
          IReaction emptyReaction = super.builder.newInstance(IReaction.class);
  
          // nothing should be made
          IRenderingElement root = generator.generate(emptyReaction, model);
          List<IRenderingElement> elements = elementUtil.getAllSimpleElements(root);
          Assert.assertEquals(0, elements.size());
      }
test_case.class_method_signature: MappingGeneratorTest.testEmptyReaction()
test_case.full_signature: @Test public void testEmptyReaction()
test_case.identifier: testEmptyReaction
test_case.invocations: newInstance generate getAllSimpleElements assertEquals size
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEmptyReaction()
focal_class.declarator: atomAtomMappingLineColor = new AtomAtomMappingLineColor()
focal_class.modifier: private
focal_class.original_string: private IGeneratorParameter<Color> atomAtomMappingLineColor = new AtomAtomMappingLineColor();
focal_class.type: IGeneratorParameter<Color>
focal_class.var_name: atomAtomMappingLineColor
focal_class.declarator: mappingLineWidth = new MappingLineWidth()
focal_class.modifier: private
focal_class.original_string: private IGeneratorParameter<Double> mappingLineWidth = new MappingLineWidth();
focal_class.type: IGeneratorParameter<Double>
focal_class.var_name: mappingLineWidth
focal_class.declarator: showAtomAtomMapping = new ShowAtomAtomMapping()
focal_class.modifier: private
focal_class.original_string: private IGeneratorParameter<Boolean> showAtomAtomMapping = new ShowAtomAtomMapping();
focal_class.type: IGeneratorParameter<Boolean>
focal_class.var_name: showAtomAtomMapping
focal_class.file: display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/MappingGenerator.java
focal_class.identifier: MappingGenerator
focal_class.interfaces: implements IGenerator<IReaction>
focal_class.class_method_signature: MappingGenerator.MappingGenerator()
focal_class.full_signature: public  MappingGenerator()
focal_class.identifier: MappingGenerator
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  MappingGenerator()
focal_class.class_method_signature: MappingGenerator.generate(IReaction reaction, RendererModel model)
focal_class.full_signature: @Override public IRenderingElement generate(IReaction reaction, RendererModel model)
focal_class.identifier: generate
focal_class.modifiers: @Override public
focal_class.parameters: (IReaction reaction, RendererModel model)
focal_class.return: IRenderingElement
focal_class.signature: IRenderingElement generate(IReaction reaction, RendererModel model)
focal_class.class_method_signature: MappingGenerator.getWidthForMappingLine(RendererModel model)
focal_class.full_signature: private double getWidthForMappingLine(RendererModel model)
focal_class.identifier: getWidthForMappingLine
focal_class.modifiers: private
focal_class.parameters: (RendererModel model)
focal_class.return: double
focal_class.signature: double getWidthForMappingLine(RendererModel model)
focal_class.class_method_signature: MappingGenerator.getParameters()
focal_class.full_signature: @Override public List<IGeneratorParameter<?>> getParameters()
focal_class.identifier: getParameters
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<IGeneratorParameter<?>>
focal_class.signature: List<IGeneratorParameter<?>> getParameters()
focal_method.body: @Override
      public IRenderingElement generate(IReaction reaction, RendererModel model) {
          if (!showAtomAtomMapping.getValue()) return null;
          ElementGroup elementGroup = new ElementGroup();
          Color mappingColor = atomAtomMappingLineColor.getValue();
          for (IMapping mapping : reaction.mappings()) {
              // XXX assume that there are only 2 endpoints!
              // XXX assume that the ChemObjects are actually IAtoms...
              IAtom endPointA = (IAtom) mapping.getChemObject(0);
              IAtom endPointB = (IAtom) mapping.getChemObject(1);
              Point2d pointA = endPointA.getPoint2d();
              Point2d pointB = endPointB.getPoint2d();
              elementGroup.add(new LineElement(pointA.x, pointA.y, pointB.x, pointB.y, getWidthForMappingLine(model),
                      mappingColor));
          }
          return elementGroup;
      }
focal_method.class_method_signature: MappingGenerator.generate(IReaction reaction, RendererModel model)
focal_method.full_signature: @Override public IRenderingElement generate(IReaction reaction, RendererModel model)
focal_method.identifier: generate
focal_method.invocations: getValue getValue mappings getChemObject getChemObject getPoint2d getPoint2d add getWidthForMappingLine
focal_method.modifiers: @Override public
focal_method.parameters: (IReaction reaction, RendererModel model)
focal_method.return: IRenderingElement
focal_method.signature: IRenderingElement generate(IReaction reaction, RendererModel model)