Skip to content
Snippets Groups Projects
Commit ff2ec80f authored by Piotr Gawron's avatar Piotr Gawron
Browse files

copy method implemented for structural state

parent 045ff5d7
No related branches found
No related tags found
1 merge request!978Resolve "species states size and position"
......@@ -199,7 +199,9 @@ public abstract class Species extends Element {
substanceUnitRawType = original.substanceUnitRawType;
uniprots = original.getUniprots();
structuralState = original.structuralState;
if (original.structuralState != null) {
setStructuralState(original.structuralState.copy());
}
// don't copy reaction nodes
}
......
......@@ -8,11 +8,8 @@ import javax.persistence.*;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
import org.hibernate.annotations.Type;
import lcsb.mapviewer.common.exception.NotImplementedException;
import lcsb.mapviewer.model.map.species.Species;
/**
......@@ -65,6 +62,9 @@ public class StructuralState implements Serializable {
public StructuralState(StructuralState mr) {
this.value = mr.getValue();
this.position = mr.position;
this.width = mr.getWidth();
this.height = mr.getHeight();
this.fontSize = mr.getFontSize();
}
public Species getSpecies() {
......@@ -84,7 +84,7 @@ public class StructuralState implements Serializable {
}
public StructuralState copy() {
throw new NotImplementedException();
return new StructuralState(this);
}
public String getValue() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment