Commit e800dad6 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

style issues

parent 302aeb8a
Pipeline #47213 failed with stage
in 19 minutes and 34 seconds
......@@ -271,7 +271,7 @@ public abstract class AbstractImageGenerator {
}
}
protected void drawModificationResidue(ModificationResidue structuralState) {
protected void drawModificationResidue(final ModificationResidue structuralState) {
ConverterParams stateParams = new ConverterParams().level(level).nested(params.nested);
if (this.sbgnFormat) {
new ModificationResidueConverter().drawModification(structuralState, graphics, stateParams);
......
......@@ -53,19 +53,15 @@ public class ModificationResidueConverter extends DrawableConverter<Modification
private ArrowTransformation arrowTransformation = new ArrowTransformation();
/**
* This method draws modification of the alias. If drawEmptyModification is
* set to false then modification is not drawn if empty. If drawDescription is
* set then also description (position) of the modification is drawn on the
* canvas.
* This method draws modification. If params.sbgn is set to false then
* modification is not drawn if empty.
*
* @param protein
* object that is 'parent' of the residue
* @param mr
* modification to be drawn
* @param graphics
* - where the modification should be drawn
* @param drawEmptyModification
* flag that indicates if we should draw empty modification
* where the modification should be drawn
* @param params
* parameters with information if we should use sbgn notation
*/
public void drawModification(final ModificationResidue mr, final Graphics2D graphics,
final ConverterParams params) {
......@@ -248,7 +244,7 @@ public class ModificationResidueConverter extends DrawableConverter<Modification
}
}
protected void setArrowTransformation(ArrowTransformation arrowTransformation) {
protected void setArrowTransformation(final ArrowTransformation arrowTransformation) {
this.arrowTransformation = arrowTransformation;
}
......
......@@ -12,7 +12,7 @@ import lcsb.mapviewer.model.map.species.field.StructuralState;
public class StructuralStateConverter extends DrawableConverter<StructuralState> {
public void draw(final StructuralState state, final Graphics2D graphics, ConverterParams params) {
public void draw(final StructuralState state, final Graphics2D graphics, final ConverterParams params) {
if (state == null || !isVisible(state.getSpecies(), params)) {
return;
}
......
......@@ -129,7 +129,8 @@ public class AbstractImageGeneratorTest extends GraphicsTestFunctions {
return model;
}
private AbstractImageGenerator createAbstractImageGeneratorMock(final Graphics2D graphics, final Model model, boolean nested) throws Exception {
private AbstractImageGenerator createAbstractImageGeneratorMock(final Graphics2D graphics, final Model model,
final boolean nested) throws Exception {
AbstractImageGenerator result = Mockito.mock(AbstractImageGenerator.class, Mockito.CALLS_REAL_METHODS);
result.setGraphics(graphics);
result.setParams(new AbstractImageGenerator.Params().model(model).level(0).nested(nested));
......
This diff is collapsed.
......@@ -548,9 +548,9 @@ public interface Model {
void addModificationDates(final Collection<Calendar> modificationDatesFromRdf);
Set<Drawable> getDrawables();
void removeBioEntity(final BioEntity bioEntitiy);
Set<Drawable> getDrawables();
Set<Drawable> getDrawables(boolean onlyVisible);
}
......@@ -699,11 +699,6 @@ public class ModelFullIndexed implements Model {
}
}
@Override
public Set<Drawable> getDrawables() {
return getDrawables(false);
}
@Override
public void removeBioEntity(final BioEntity bioEntitiy) {
if (bioEntitiy instanceof Reaction) {
......@@ -716,7 +711,12 @@ public class ModelFullIndexed implements Model {
}
@Override
public Set<Drawable> getDrawables(boolean onlyVisible) {
public Set<Drawable> getDrawables() {
return getDrawables(false);
}
@Override
public Set<Drawable> getDrawables(final boolean onlyVisible) {
Set<Drawable> result = new HashSet<>();
result.addAll(getBioEntities());
for (Species species : getSpeciesList()) {
......
......@@ -191,7 +191,7 @@ public abstract class ModificationResidue implements Serializable, Drawable {
}
@Override
public void setZ(Integer z) {
public void setZ(final Integer z) {
this.z = z;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment