Commit 1d77f3dd authored by Piotr Gawron's avatar Piotr Gawron
Browse files

white compartments imported from gpml have black border

parent eb3273bd
package lcsb.mapviewer.wikipathway.XML;
import java.awt.*;
import java.awt.Color;
import java.awt.geom.*;
import java.util.*;
import java.util.List;
import org.apache.commons.text.StringEscapeUtils;
import org.apache.logging.log4j.LogManager;
......@@ -11,7 +10,8 @@ import org.apache.logging.log4j.Logger;
import lcsb.mapviewer.common.Configuration;
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.converter.ConverterException;
import lcsb.mapviewer.converter.model.celldesigner.geometry.CellDesignerAliasConverter;
......@@ -31,8 +31,6 @@ import lcsb.mapviewer.model.map.species.*;
import lcsb.mapviewer.model.map.species.field.*;
import lcsb.mapviewer.modelutils.map.ElementUtils;
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.utils.Geo;
......@@ -352,7 +350,7 @@ public class ModelContructor {
private StructuralState createStructuralState(State state, Species species) {
Double x = state.getRelX() * species.getWidth() + species.getX();
Double y = state.getRelY() * species.getHeight() + species.getY();
StructuralState structuralState= new StructuralState();
StructuralState structuralState = new StructuralState();
structuralState.setPosition(new Point2D.Double(x, y));
structuralState.setFontSize(10);
structuralState.setHeight(state.getHeight());
......@@ -480,7 +478,7 @@ public class ModelContructor {
element.setWidth((int) rec.getWidth());
element.setHeight((int) rec.getHeight());
element.setFillColor(gpmlElement.getFillColor());
if (element instanceof Compartment) {
if (element instanceof Compartment && !Objects.equals(Color.WHITE, gpmlElement.getFillColor())) {
element.setBorderColor(gpmlElement.getFillColor());
}
return element;
......
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