package edu.sdsc.mbt; import edu.sdsc.mbt.viewables.StylesPreferences; public class ArrowComponent extends AnnotationComponent { public double[] start = new double[3]; public double[] end = new double[3]; private int TYPE = AnnotationComponentRegistry.TYPE_ARROW; public float[] color = new float[]{ 0.7f, 0.7f, 0.7f }; public double radius = 1.0; public ArrowComponent(double[] start, double[] end, double radius, float[] color){ this.start[0] = start[0]; this.start[1] = start[1]; this.start[2] = start[2]; this.end[0] = end[0]; this.end[1] = end[1]; this.end[2] = end[2]; this.radius = radius; if (color != null){ this.color[0] = color[0]; this.color[1] = color[1]; this.color[2] = color[2]; } } public int getType(){ return TYPE; } public float[] getColor(){ if (selected){ return StylesPreferences.selectionColor; } else{ return color; } } private boolean selected = false; private boolean visible = true; public void setSelected(boolean selected){ this.selected = selected; } public boolean getSelected(){ return selected; } public final boolean getVisible() { return visible; } public final void setVisible(boolean visible) { this.visible = visible; } }