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

white compartments imported from gpml have black border

parent eb3273bd
No related branches found
No related tags found
1 merge request!981Resolve "Set border color for TextAreas"
Pipeline #15662 passed
package lcsb.mapviewer.wikipathway.XML; package lcsb.mapviewer.wikipathway.XML;
import java.awt.*; import java.awt.Color;
import java.awt.geom.*; import java.awt.geom.*;
import java.util.*; import java.util.*;
import java.util.List;
import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.text.StringEscapeUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
...@@ -11,7 +10,8 @@ import org.apache.logging.log4j.Logger; ...@@ -11,7 +10,8 @@ import org.apache.logging.log4j.Logger;
import lcsb.mapviewer.common.Configuration; import lcsb.mapviewer.common.Configuration;
import lcsb.mapviewer.common.Pair; import lcsb.mapviewer.common.Pair;
import lcsb.mapviewer.common.exception.*; import lcsb.mapviewer.common.exception.InvalidArgumentException;
import lcsb.mapviewer.common.exception.InvalidStateException;
import lcsb.mapviewer.common.geometry.PointTransformation; import lcsb.mapviewer.common.geometry.PointTransformation;
import lcsb.mapviewer.converter.ConverterException; import lcsb.mapviewer.converter.ConverterException;
import lcsb.mapviewer.converter.model.celldesigner.geometry.CellDesignerAliasConverter; import lcsb.mapviewer.converter.model.celldesigner.geometry.CellDesignerAliasConverter;
...@@ -31,8 +31,6 @@ import lcsb.mapviewer.model.map.species.*; ...@@ -31,8 +31,6 @@ import lcsb.mapviewer.model.map.species.*;
import lcsb.mapviewer.model.map.species.field.*; import lcsb.mapviewer.model.map.species.field.*;
import lcsb.mapviewer.modelutils.map.ElementUtils; import lcsb.mapviewer.modelutils.map.ElementUtils;
import lcsb.mapviewer.wikipathway.model.*; import lcsb.mapviewer.wikipathway.model.*;
import lcsb.mapviewer.wikipathway.model.Label;
import lcsb.mapviewer.wikipathway.model.Shape;
import lcsb.mapviewer.wikipathway.model.biopax.BiopaxPublication; import lcsb.mapviewer.wikipathway.model.biopax.BiopaxPublication;
import lcsb.mapviewer.wikipathway.utils.Geo; import lcsb.mapviewer.wikipathway.utils.Geo;
...@@ -352,7 +350,7 @@ public class ModelContructor { ...@@ -352,7 +350,7 @@ public class ModelContructor {
private StructuralState createStructuralState(State state, Species species) { private StructuralState createStructuralState(State state, Species species) {
Double x = state.getRelX() * species.getWidth() + species.getX(); Double x = state.getRelX() * species.getWidth() + species.getX();
Double y = state.getRelY() * species.getHeight() + species.getY(); Double y = state.getRelY() * species.getHeight() + species.getY();
StructuralState structuralState= new StructuralState(); StructuralState structuralState = new StructuralState();
structuralState.setPosition(new Point2D.Double(x, y)); structuralState.setPosition(new Point2D.Double(x, y));
structuralState.setFontSize(10); structuralState.setFontSize(10);
structuralState.setHeight(state.getHeight()); structuralState.setHeight(state.getHeight());
...@@ -480,7 +478,7 @@ public class ModelContructor { ...@@ -480,7 +478,7 @@ public class ModelContructor {
element.setWidth((int) rec.getWidth()); element.setWidth((int) rec.getWidth());
element.setHeight((int) rec.getHeight()); element.setHeight((int) rec.getHeight());
element.setFillColor(gpmlElement.getFillColor()); element.setFillColor(gpmlElement.getFillColor());
if (element instanceof Compartment) { if (element instanceof Compartment && !Objects.equals(Color.WHITE, gpmlElement.getFillColor())) {
element.setBorderColor(gpmlElement.getFillColor()); element.setBorderColor(gpmlElement.getFillColor());
} }
return element; return element;
......
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