Permalink
Browse files

Inherit JavaDoc where possible

  • Loading branch information...
egonw committed Feb 10, 2012
1 parent 54f54ce commit 8e7300f20723f2315d3855fd7f62ec51ecc28ac2
@@ -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);
@@ -45,6 +47,8 @@ public IRenderingElement generate( IAtomContainer ac, RendererModel model) {
}
+ /** {@inheritDoc}} */
+ @Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Collections.emptyList();
@@ -52,7 +52,8 @@
public static class AtomNumberTextColor extends
AbstractGeneratorParameter<Color> {
- public Color getDefault() {
+ /** {@inheritDoc}} */
+ public Color getDefault() {
return Color.BLACK;
}
}
@@ -61,6 +62,7 @@ public Color getDefault() {
public static class WillDrawAtomNumbers extends
AbstractGeneratorParameter<Boolean> {
+ /** {@inheritDoc}} */
public Boolean getDefault() {
return Boolean.TRUE;
}
@@ -70,6 +72,7 @@ public Boolean getDefault() {
public static class AtomColorer extends
AbstractGeneratorParameter<IAtomColorer> {
+ /** {@inheritDoc}} */
public IAtomColorer getDefault() {
return new CDK2DAtomColors();
}
@@ -78,6 +81,7 @@ public IAtomColorer getDefault() {
public static class ColorByType extends
AbstractGeneratorParameter<Boolean> {
+ /** {@inheritDoc}} */
public Boolean getDefault() {
return Boolean.FALSE;
}
@@ -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();
@@ -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<?>[] {
@@ -54,6 +54,7 @@
*/
public static class BoundsColor extends
AbstractGeneratorParameter<Color> {
+ /** {@inheritDoc}} */
public Color getDefault() {
return Color.LIGHT_GRAY;
}
@@ -62,6 +63,8 @@ public Color getDefault() {
public BoundsGenerator() {}
+ /** {@inheritDoc}} */
+ @Override
@TestMethod("testEmptyReaction")
public IRenderingElement generate(IReaction reaction, RendererModel model) {
ElementGroup elementGroup = new ElementGroup();
@@ -98,6 +101,8 @@ public IRenderingElement generate(
boundsColor.getValue());
}
+ /** {@inheritDoc}} */
+ @Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Arrays.asList(
@@ -51,6 +51,7 @@
public static class ShowImplicitHydrogens extends
AbstractGeneratorParameter<Boolean> {
+ /** {@inheritDoc}} */
public Boolean getDefault() {
return Boolean.TRUE;
}
@@ -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;
@@ -208,6 +212,8 @@ public Position getPosition(IAtom atom, IAtom connectedAtom) {
}
}
+ /** {@inheritDoc}} */
+ @Override
@TestMethod("getParametersTest")
public List<IGeneratorParameter<?>> getParameters() {
List<IGeneratorParameter<?>> parameters =
@@ -51,6 +51,8 @@
public LonePairGenerator() {}
+ /** {@inheritDoc}} */
+ @Override
@TestMethod("testEmptyContainer")
public IRenderingElement generate(IAtomContainer ac, RendererModel model) {
ElementGroup group = new ElementGroup();
@@ -101,6 +103,8 @@ public IRenderingElement generate(IAtomContainer ac, RendererModel model) {
return group;
}
+ /** {@inheritDoc}} */
+ @Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Collections.emptyList();
@@ -49,6 +49,7 @@
*/
public static class AtomAtomMappingLineColor extends
AbstractGeneratorParameter<Color> {
+ /** {@inheritDoc}} */
public Color getDefault() {
return Color.gray;
}
@@ -61,6 +62,7 @@ public Color getDefault() {
*/
public static class MappingLineWidth extends
AbstractGeneratorParameter<Double> {
+ /** {@inheritDoc}} */
public Double getDefault() {
return 1.0;
}
@@ -70,6 +72,7 @@ public Double getDefault() {
public static class ShowAtomAtomMapping extends
AbstractGeneratorParameter<Boolean> {
+ /** {@inheritDoc}} */
public Boolean getDefault() {
return Boolean.TRUE;
}
@@ -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;
@@ -110,6 +115,8 @@ public double getWidthForMappingLine(RendererModel model) {
return mappingLineWidth.getValue() / scale;
}
+ /** {@inheritDoc}} */
+ @Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Arrays.asList(
@@ -51,6 +51,8 @@
private static double DISTANCE;
+ /** {@inheritDoc}} */
+ @Override
@TestMethod("testEmptyReaction")
public IRenderingElement generate(IReaction reaction, RendererModel model) {
if(!model.getParameter(ShowReactionBoxes.class).getValue())
@@ -89,6 +91,8 @@ public IRenderingElement generate(IReaction reaction, RendererModel model) {
return diagram;
}
+ /** {@inheritDoc}} */
+ @Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Arrays.asList(
@@ -53,6 +53,8 @@
public RadicalGenerator() {}
+ /** {@inheritDoc}} */
+ @Override
@TestMethod("testEmptyContainer")
public IRenderingElement generate(IAtomContainer ac, RendererModel model) {
ElementGroup group = new ElementGroup();
@@ -93,6 +95,8 @@ public IRenderingElement generate(IAtomContainer ac, RendererModel model) {
return group;
}
+ /** {@inheritDoc}} */
+ @Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Collections.emptyList();
@@ -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())
@@ -73,6 +75,8 @@ public IRenderingElement generate(IReaction reaction, RendererModel model) {
return diagram;
}
+ /** {@inheritDoc}} */
+ @Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Arrays.asList(
@@ -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 =
@@ -67,6 +69,8 @@ public IRenderingElement generate(IReaction reaction, RendererModel model) {
);
}
+ /** {@inheritDoc}} */
+ @Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Arrays.asList(
@@ -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())
@@ -76,6 +78,8 @@ public IRenderingElement generate(IReaction reaction, RendererModel model) {
return diagram;
}
+ /** {@inheritDoc}} */
+ @Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Arrays.asList(
@@ -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();
@@ -82,6 +84,8 @@ public TextElement makePlus(
return new TextElement(x, axis, "+", color);
}
+ /** {@inheritDoc}} */
+ @Override
@TestMethod("testGetParameters")
public List<IGeneratorParameter<?>> getParameters() {
return Arrays.asList(
@@ -41,6 +41,7 @@
public static class ShowReactionBoxes extends
AbstractGeneratorParameter<Boolean> {
+ /** {@inheritDoc}} */
public Boolean getDefault() {
return Boolean.TRUE;
}
@@ -50,6 +51,7 @@ public Boolean getDefault() {
public static class ArrowHeadWidth extends
AbstractGeneratorParameter<Double> {
+ /** {@inheritDoc}} */
public Double getDefault() {
return 10.0;
}
@@ -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(

0 comments on commit 8e7300f

Please sign in to comment.