Skip to content

Commit

Permalink
Inherit JavaDoc where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed May 19, 2012
1 parent 54f54ce commit 8e7300f
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 1 deletion.
Expand Up @@ -37,6 +37,8 @@
@TestClass("org.openscience.cdk.renderer.generators.AtomContainerBoundsGeneratorTest")
public class AtomContainerBoundsGenerator implements IGenerator<IAtomContainer> {

/** {@inheritDoc}} */
@Override
@TestMethod("testEmptyContainer")
public IRenderingElement generate( IAtomContainer ac, RendererModel model) {
double[] minMax = GeometryTools.getMinMax(ac);
Expand All @@ -45,6 +47,8 @@ public IRenderingElement generate( IAtomContainer ac, RendererModel model) {

}

/** {@inheritDoc}} */
@Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Collections.emptyList();
Expand Down
Expand Up @@ -52,7 +52,8 @@ public class AtomNumberGenerator implements IGenerator<IAtomContainer> {

public static class AtomNumberTextColor extends
AbstractGeneratorParameter<Color> {
public Color getDefault() {
/** {@inheritDoc}} */
public Color getDefault() {
return Color.BLACK;
}
}
Expand All @@ -61,6 +62,7 @@ public Color getDefault() {

public static class WillDrawAtomNumbers extends
AbstractGeneratorParameter<Boolean> {
/** {@inheritDoc}} */
public Boolean getDefault() {
return Boolean.TRUE;
}
Expand All @@ -70,6 +72,7 @@ public Boolean getDefault() {

public static class AtomColorer extends
AbstractGeneratorParameter<IAtomColorer> {
/** {@inheritDoc}} */
public IAtomColorer getDefault() {
return new CDK2DAtomColors();
}
Expand All @@ -78,6 +81,7 @@ public IAtomColorer getDefault() {

public static class ColorByType extends
AbstractGeneratorParameter<Boolean> {
/** {@inheritDoc}} */
public Boolean getDefault() {
return Boolean.FALSE;
}
Expand All @@ -90,12 +94,15 @@ public Boolean getDefault() {
*/
public static class Offset extends
AbstractGeneratorParameter<Vector2d> {
/** {@inheritDoc}} */
public Vector2d getDefault() {
return new Vector2d();
}
}
private Offset offset = new Offset();

/** {@inheritDoc}} */
@Override
@TestMethod("testEmptyContainer")
public IRenderingElement generate(IAtomContainer ac, RendererModel model) {
ElementGroup numbers = new ElementGroup();
Expand Down Expand Up @@ -125,6 +132,8 @@ public IRenderingElement generate(IAtomContainer ac, RendererModel model) {
return numbers;
}

/** {@inheritDoc}} */
@Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Arrays.asList( new IGeneratorParameter<?>[] {
Expand Down
Expand Up @@ -54,6 +54,7 @@ public class BoundsGenerator implements IGenerator<IReaction> {
*/
public static class BoundsColor extends
AbstractGeneratorParameter<Color> {
/** {@inheritDoc}} */
public Color getDefault() {
return Color.LIGHT_GRAY;
}
Expand All @@ -62,6 +63,8 @@ public Color getDefault() {

public BoundsGenerator() {}

/** {@inheritDoc}} */
@Override
@TestMethod("testEmptyReaction")
public IRenderingElement generate(IReaction reaction, RendererModel model) {
ElementGroup elementGroup = new ElementGroup();
Expand Down Expand Up @@ -98,6 +101,8 @@ public IRenderingElement generate(
boundsColor.getValue());
}

/** {@inheritDoc}} */
@Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Arrays.asList(
Expand Down
Expand Up @@ -51,6 +51,7 @@ public class ExtendedAtomGenerator extends BasicAtomGenerator {

public static class ShowImplicitHydrogens extends
AbstractGeneratorParameter<Boolean> {
/** {@inheritDoc}} */
public Boolean getDefault() {
return Boolean.TRUE;
}
Expand All @@ -60,13 +61,16 @@ public Boolean getDefault() {

public static class ShowAtomTypeNames extends
AbstractGeneratorParameter<Boolean> {
/** {@inheritDoc}} */
public Boolean getDefault() {
return Boolean.FALSE;
}
}
private ShowAtomTypeNames showAtomTypeNames =
new ShowAtomTypeNames();

/** {@inheritDoc}} */
@Override
public IRenderingElement generate(
IAtomContainer ac, IAtom atom, RendererModel model) {
boolean drawNumbers = false;
Expand Down Expand Up @@ -208,6 +212,8 @@ public Position getPosition(IAtom atom, IAtom connectedAtom) {
}
}

/** {@inheritDoc}} */
@Override
@TestMethod("getParametersTest")
public List<IGeneratorParameter<?>> getParameters() {
List<IGeneratorParameter<?>> parameters =
Expand Down
Expand Up @@ -51,6 +51,8 @@ public class LonePairGenerator implements IGenerator<IAtomContainer> {

public LonePairGenerator() {}

/** {@inheritDoc}} */
@Override
@TestMethod("testEmptyContainer")
public IRenderingElement generate(IAtomContainer ac, RendererModel model) {
ElementGroup group = new ElementGroup();
Expand Down Expand Up @@ -101,6 +103,8 @@ public IRenderingElement generate(IAtomContainer ac, RendererModel model) {
return group;
}

/** {@inheritDoc}} */
@Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Collections.emptyList();
Expand Down
Expand Up @@ -49,6 +49,7 @@ public class MappingGenerator implements IGenerator<IReaction> {
*/
public static class AtomAtomMappingLineColor extends
AbstractGeneratorParameter<Color> {
/** {@inheritDoc}} */
public Color getDefault() {
return Color.gray;
}
Expand All @@ -61,6 +62,7 @@ public Color getDefault() {
*/
public static class MappingLineWidth extends
AbstractGeneratorParameter<Double> {
/** {@inheritDoc}} */
public Double getDefault() {
return 1.0;
}
Expand All @@ -70,6 +72,7 @@ public Double getDefault() {

public static class ShowAtomAtomMapping extends
AbstractGeneratorParameter<Boolean> {
/** {@inheritDoc}} */
public Boolean getDefault() {
return Boolean.TRUE;
}
Expand All @@ -79,6 +82,8 @@ public Boolean getDefault() {

public MappingGenerator() {}

/** {@inheritDoc}} */
@Override
@TestMethod("testEmptyReaction")
public IRenderingElement generate(IReaction reaction, RendererModel model) {
if(!showAtomAtomMapping.getValue()) return null;
Expand Down Expand Up @@ -110,6 +115,8 @@ public double getWidthForMappingLine(RendererModel model) {
return mappingLineWidth.getValue() / scale;
}

/** {@inheritDoc}} */
@Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Arrays.asList(
Expand Down
Expand Up @@ -51,6 +51,8 @@ public class ProductsBoxGenerator implements IGenerator<IReaction> {

private static double DISTANCE;

/** {@inheritDoc}} */
@Override
@TestMethod("testEmptyReaction")
public IRenderingElement generate(IReaction reaction, RendererModel model) {
if(!model.getParameter(ShowReactionBoxes.class).getValue())
Expand Down Expand Up @@ -89,6 +91,8 @@ public IRenderingElement generate(IReaction reaction, RendererModel model) {
return diagram;
}

/** {@inheritDoc}} */
@Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Arrays.asList(
Expand Down
Expand Up @@ -53,6 +53,8 @@ public class RadicalGenerator implements IGenerator<IAtomContainer> {

public RadicalGenerator() {}

/** {@inheritDoc}} */
@Override
@TestMethod("testEmptyContainer")
public IRenderingElement generate(IAtomContainer ac, RendererModel model) {
ElementGroup group = new ElementGroup();
Expand Down Expand Up @@ -93,6 +95,8 @@ public IRenderingElement generate(IAtomContainer ac, RendererModel model) {
return group;
}

/** {@inheritDoc}} */
@Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Collections.emptyList();
Expand Down
Expand Up @@ -46,6 +46,8 @@
@TestClass("org.openscience.cdk.renderer.generators.ReactantsBoxGeneratorTest")
public class ReactantsBoxGenerator implements IGenerator<IReaction> {

/** {@inheritDoc}} */
@Override
@TestMethod("testEmptyReaction")
public IRenderingElement generate(IReaction reaction, RendererModel model) {
if (!model.getParameter(ShowReactionBoxes.class).getValue())
Expand Down Expand Up @@ -73,6 +75,8 @@ public IRenderingElement generate(IReaction reaction, RendererModel model) {
return diagram;
}

/** {@inheritDoc}} */
@Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Arrays.asList(
Expand Down
Expand Up @@ -43,6 +43,8 @@
@TestClass("org.openscience.cdk.renderer.generators.ReactionArrowGeneratorTest")
public class ReactionArrowGenerator implements IGenerator<IReaction> {

/** {@inheritDoc}} */
@Override
@TestMethod("testEmptyReaction")
public IRenderingElement generate(IReaction reaction, RendererModel model) {
Rectangle2D totalBoundsReactants =
Expand All @@ -67,6 +69,8 @@ public IRenderingElement generate(IReaction reaction, RendererModel model) {
);
}

/** {@inheritDoc}} */
@Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Arrays.asList(
Expand Down
Expand Up @@ -46,6 +46,8 @@
@TestClass("org.openscience.cdk.renderer.generators.ReactionBoxGeneratorTest")
public class ReactionBoxGenerator implements IGenerator<IReaction> {

/** {@inheritDoc}} */
@Override
@TestMethod("testEmptyReaction")
public IRenderingElement generate(IReaction reaction, RendererModel model) {
if (!model.getParameter(ShowReactionBoxes.class).getValue())
Expand Down Expand Up @@ -76,6 +78,8 @@ public IRenderingElement generate(IReaction reaction, RendererModel model) {
return diagram;
}

/** {@inheritDoc}} */
@Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Arrays.asList(
Expand Down
Expand Up @@ -44,6 +44,8 @@
@TestClass("org.openscience.cdk.renderer.generators.ReactionPlusGeneratorTest")
public class ReactionPlusGenerator implements IGenerator<IReaction> {

/** {@inheritDoc}} */
@Override
@TestMethod("testEmptyReaction")
public IRenderingElement generate(IReaction reaction, RendererModel model) {
ElementGroup diagram = new ElementGroup();
Expand Down Expand Up @@ -82,6 +84,8 @@ public TextElement makePlus(
return new TextElement(x, axis, "+", color);
}

/** {@inheritDoc}} */
@Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Arrays.asList(
Expand Down
Expand Up @@ -41,6 +41,7 @@ public class ReactionSceneGenerator implements IGenerator<IReaction> {

public static class ShowReactionBoxes extends
AbstractGeneratorParameter<Boolean> {
/** {@inheritDoc}} */
public Boolean getDefault() {
return Boolean.TRUE;
}
Expand All @@ -50,6 +51,7 @@ public Boolean getDefault() {

public static class ArrowHeadWidth extends
AbstractGeneratorParameter<Double> {
/** {@inheritDoc}} */
public Double getDefault() {
return 10.0;
}
Expand All @@ -59,11 +61,15 @@ public Double getDefault() {

public ReactionSceneGenerator() {}

/** {@inheritDoc}} */
@Override
@TestMethod("testEmptyReaction")
public IRenderingElement generate(IReaction reaction, RendererModel model) {
return new ElementGroup();
}

/** {@inheritDoc}} */
@Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Arrays.asList(
Expand Down

0 comments on commit 8e7300f

Please sign in to comment.