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

when parsing compartments border color is almost always the same as fill color

parent f7273bf4
package lcsb.mapviewer.converter.model.celldesigner.alias;
import java.awt.Color;
import java.util.Objects;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.w3c.dom.Node;
......@@ -96,7 +99,13 @@ public class CompartmentAliasXmlParser extends AbstractAliasXmlParser<Compartmen
result.setLineOuterWidth(XmlParser.getNodeAttr("outerWidth", node));
result.setLineInnerWidth(XmlParser.getNodeAttr("innerWidth", node));
} else if (node.getNodeName().equalsIgnoreCase("celldesigner:paint")) {
result.setFillColor(getCommonParser().getColor(node));
Color color = getCommonParser().getColor(node);
result.setFillColor(color);
if (Objects.equals(color, Color.WHITE)) {
result.setBorderColor(Color.BLACK);
} else {
result.setBorderColor(color);
}
} else if (node.getNodeName().equalsIgnoreCase("celldesigner:info")) {
// not handled
continue;
......
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