test_class.declarator: generator
test_class.modifier: private
test_class.original_string: private AtomNumberGenerator generator;
test_class.type: AtomNumberGenerator
test_class.var_name: generator
test_class.file: display/renderextra/src/test/java/org/openscience/cdk/renderer/generators/AtomNumberGeneratorTest.java
test_class.identifier: AtomNumberGeneratorTest
test_class.superclass: extends AbstractGeneratorTest
test_case.body: @Test
      public void testEmptyContainer() {
          IAtomContainer emptyContainer = super.builder.newInstance(IAtomContainer.class);
  
          // nothing should be made
          IRenderingElement root = generator.generate(emptyContainer, model);
          List<IRenderingElement> elements = elementUtil.getAllSimpleElements(root);
          Assert.assertEquals(0, elements.size());
      }
test_case.class_method_signature: AtomNumberGeneratorTest.testEmptyContainer()
test_case.full_signature: @Test public void testEmptyContainer()
test_case.identifier: testEmptyContainer
test_case.invocations: newInstance generate getAllSimpleElements assertEquals size
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEmptyContainer()
focal_class.declarator: textColor = new AtomNumberTextColor()
focal_class.modifier: private
focal_class.original_string: private IGeneratorParameter<Color> textColor = new AtomNumberTextColor();
focal_class.type: IGeneratorParameter<Color>
focal_class.var_name: textColor
focal_class.declarator: willDrawAtomNumbers = new WillDrawAtomNumbers()
focal_class.modifier: private
focal_class.original_string: private WillDrawAtomNumbers willDrawAtomNumbers = new WillDrawAtomNumbers();
focal_class.type: WillDrawAtomNumbers
focal_class.var_name: willDrawAtomNumbers
focal_class.declarator: atomColorer = new AtomColorer()
focal_class.modifier: private
focal_class.original_string: private IGeneratorParameter<IAtomColorer> atomColorer = new AtomColorer();
focal_class.type: IGeneratorParameter<IAtomColorer>
focal_class.var_name: atomColorer
focal_class.declarator: colorByType = new ColorByType()
focal_class.modifier: private
focal_class.original_string: private IGeneratorParameter<Boolean> colorByType = new ColorByType();
focal_class.type: IGeneratorParameter<Boolean>
focal_class.var_name: colorByType
focal_class.declarator: offset = new Offset()
focal_class.modifier: private
focal_class.original_string: private Offset offset = new Offset();
focal_class.type: Offset
focal_class.var_name: offset
focal_class.file: display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/AtomNumberGenerator.java
focal_class.identifier: AtomNumberGenerator
focal_class.interfaces: implements IGenerator<IAtomContainer>
focal_class.class_method_signature: AtomNumberGenerator.generate(IAtomContainer container, RendererModel model)
focal_class.full_signature: @Override public IRenderingElement generate(IAtomContainer container, RendererModel model)
focal_class.identifier: generate
focal_class.modifiers: @Override public
focal_class.parameters: (IAtomContainer container, RendererModel model)
focal_class.return: IRenderingElement
focal_class.signature: IRenderingElement generate(IAtomContainer container, RendererModel model)
focal_class.class_method_signature: AtomNumberGenerator.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(IAtomContainer container, RendererModel model) {
          ElementGroup numbers = new ElementGroup();
          if (!model.getParameter(WillDrawAtomNumbers.class).getValue()) return numbers;
  
          Vector2d offset = new Vector2d(this.offset.getValue().x, -this.offset.getValue().y);
          offset.scale(1 / model.getParameter(Scale.class).getValue());
  
          int number = 1;
          for (IAtom atom : container.atoms()) {
              Point2d point = new Point2d(atom.getPoint2d());
              point.add(offset);
              numbers.add(new TextElement(point.x, point.y, String.valueOf(number), colorByType.getValue() ? atomColorer
                      .getValue().getAtomColor(atom) : textColor.getValue()));
              number++;
          }
          return numbers;
      }
focal_method.class_method_signature: AtomNumberGenerator.generate(IAtomContainer container, RendererModel model)
focal_method.full_signature: @Override public IRenderingElement generate(IAtomContainer container, RendererModel model)
focal_method.identifier: generate
focal_method.invocations: getValue getParameter getValue getValue scale getValue getParameter atoms getPoint2d add add valueOf getValue getAtomColor getValue getValue
focal_method.modifiers: @Override public
focal_method.parameters: (IAtomContainer container, RendererModel model)
focal_method.return: IRenderingElement
focal_method.signature: IRenderingElement generate(IAtomContainer container, RendererModel model)