+ if (annotations[i].value < min)
+ {
+ min = annotations[i].value;
+ }
+ }
+ // ensure zero is origin for min/max ranges on only one side of zero
+ if (min > 0)
+ {
+ min = 0;
+ }
+ else
+ {
+ if (max < 0)
+ {
+ max = 0;
+ }
+ }
+ }
+
+ graphMin = min;
+ graphMax = max;
+
+ areLabelsSecondaryStructure();
+
+ if (!drawValues && graphType != NO_GRAPH)
+ {
+ for (int i = 0; i < annotations.length; i++)
+ {
+ if (annotations[i] != null)
+ {
+ annotations[i].displayCharacter = "";
+ }
+ }
+ }
+ }
+
+ /**
+ * Copy constructor creates a new independent annotation row with the same
+ * associated sequenceRef
+ *
+ * @param annotation
+ */
+ public AlignmentAnnotation(AlignmentAnnotation annotation)
+ {
+ this.label = new String(annotation.label);
+ if (annotation.description != null)
+ this.description = new String(annotation.description);
+ this.graphMin = annotation.graphMin;
+ this.graphMax = annotation.graphMax;
+ this.graph = annotation.graph;
+ this.graphHeight = annotation.graphHeight;
+ this.graphGroup = annotation.graphGroup;
+ this.groupRef = annotation.groupRef;
+ this.editable = annotation.editable;
+ this.autoCalculated = annotation.autoCalculated;
+ this.hasIcons = annotation.hasIcons;
+ this.hasText = annotation.hasText;
+ this.height = annotation.height;
+ this.label = annotation.label;
+ this.padGaps = annotation.padGaps;
+ this.visible = annotation.visible;
+ if (this.hasScore = annotation.hasScore)
+ {
+ this.score = annotation.score;
+ }
+ if (annotation.threshold != null)
+ {
+ threshold = new GraphLine(annotation.threshold);
+ }
+ if (annotation.annotations != null)
+ {
+ Annotation[] ann = annotation.annotations;
+ this.annotations = new Annotation[ann.length];
+ for (int i = 0; i < ann.length; i++)
+ {
+ annotations[i] = new Annotation(ann[i]);
+ }
+ ;
+ if (annotation.sequenceRef != null)
+ {
+ this.sequenceRef = annotation.sequenceRef;
+ if (annotation.sequenceMapping != null)