/** * */ package muscle; import java.awt.Color; import repast.simphony.visualizationOGL2D.DefaultStyleOGL2D; import saf.v3d.ShapeFactory2D; import saf.v3d.scene.VSpatial; /** * @author Kelley Virgilio * */ public class NecrosisStyle extends DefaultStyleOGL2D { private ShapeFactory2D shapeFactory; @Override public void init(ShapeFactory2D factory){ this.shapeFactory = factory; } @Override public Color getColor(Object o){ if (((Necrosis) o).getSecondary() == 1){ // secondary necrosis return new Color(124,154,156); // darker blue } else return new Color(47,215,237); // bright blue } @Override public VSpatial getVSpatial(Object agent, VSpatial spatial) { if (spatial == null) { spatial = shapeFactory.createRectangle(15, 15); } return spatial; } }