@TestClass(value="org.openscience.cdk.renderer.generators.BasicAtomGeneratorTest") public class BasicAtomGenerator extends Object implements IGenerator<IAtomContainer>
IRenderingElement
s for atoms in an atom container.Modifier and Type | Class and Description |
---|---|
static class |
BasicAtomGenerator.AtomColor
Class to hold the color by which atom labels are drawn.
|
static class |
BasicAtomGenerator.AtomColorer
IAtomColorer used to draw elements. |
static class |
BasicAtomGenerator.AtomRadius
Magic number with unknown units that defines the radius
around an atom, e.g.
|
static class |
BasicAtomGenerator.ColorByType
Boolean property that triggers atoms to be colored by type
when set to true.
|
static class |
BasicAtomGenerator.CompactAtom
Boolean parameters that will cause atoms to be drawn as
filled shapes when set to true.
|
static class |
BasicAtomGenerator.CompactShape
Shape to be used when drawing atoms in compact mode,
as defined by the
BasicAtomGenerator.CompactAtom parameter. |
static class |
BasicAtomGenerator.KekuleStructure
Determines whether structures should be drawn as Kekule structures, thus
giving each carbon element explicitly, instead of not displaying the
element symbol.
|
static class |
BasicAtomGenerator.Shape
When atoms are selected or in compact mode, they will
be covered by a shape determined by this enumeration.
|
static class |
BasicAtomGenerator.ShowEndCarbons
Boolean parameters that will show carbons with only one
(non-hydrogen) neighbor to be drawn with an element symbol.
|
static class |
BasicAtomGenerator.ShowExplicitHydrogens
Boolean property that triggers explicit hydrogens to be
drawn if set to true.
|
Constructor and Description |
---|
BasicAtomGenerator()
An empty constructor necessary for reflection.
|
Modifier and Type | Method and Description |
---|---|
IRenderingElement |
generate(IAtomContainer atomContainer,
IAtom atom,
RendererModel model)
Generate the rendering element(s) for a particular atom.
|
IRenderingElement |
generate(IAtomContainer container,
RendererModel model)
Converts a
IChemObject from the chemical data model into
something that can be drawn in the chemical drawing. |
IRenderingElement |
generateCompactElement(IAtom atom,
RendererModel model)
Generate a compact element for an atom, such as a circle or a square,
rather than text element.
|
AtomSymbolElement |
generateElement(IAtom atom,
int alignment,
RendererModel model)
Generate an atom symbol element.
|
List<IGeneratorParameter<?>> |
getParameters()
Returns the list of
IGeneratorParameter for this particular
generator. |
public BasicAtomGenerator()
@TestMethod(value="testSingleBond,testSquare") public IRenderingElement generate(IAtomContainer container, RendererModel model)
IChemObject
from the chemical data model into
something that can be drawn in the chemical drawing.generate
in interface IGenerator<IAtomContainer>
container
- the chemical entity to be depictedmodel
- the rendering parameters@TestMethod(value="testSingleAtom") public IRenderingElement generate(IAtomContainer atomContainer, IAtom atom, RendererModel model)
atomContainer
- the atom container that the atom is fromatom
- the atom to generate the rendering element formodel
- the renderer model@TestMethod(value="ovalShapeTest,squareShapeTest") public IRenderingElement generateCompactElement(IAtom atom, RendererModel model)
atom
- the atom to generate the compact element formodel
- the renderer model@TestMethod(value="generateElementTest") public AtomSymbolElement generateElement(IAtom atom, int alignment, RendererModel model)
atom
- the atom to usealignment
- the alignment of the atom's labelmodel
- the renderer model@TestMethod(value="getParametersTest") public List<IGeneratorParameter<?>> getParameters()
IGeneratorParameter
for this particular
generator.getParameters
in interface IGenerator<IAtomContainer>
List
of IGeneratorParameter
s