int graphType)
{
// graphs are not editable
+ editable = graphType==0;
+
this.label = label;
this.description = description;
this.annotations = annotations;
float min = graphMin;
float max = graphMax;
boolean drawValues = true;
-
+
if (min == max)
{
min = 999999999;
}
}
}
-
+
/**
* Copy constructor
- * creates a new independent annotation row with the same associated sequenceRef
+ * creates a new independent annotation row with the same associated sequenceRef
* @param annotation
*/
public AlignmentAnnotation(AlignmentAnnotation annotation)
{
this.label = new String(annotation.label);
- this.description = new String(annotation.description);
+ if (annotation.description != null)
+ this.description = new String(annotation.description);
this.graphMin = annotation.graphMin;
this.graphMax = annotation.graphMax;
this.graph = annotation.graph;
while (pos.hasMoreElements()) {
Integer p = (Integer) pos.nextElement();
Annotation a = (Annotation) sequenceMapping.get(p);
- sequenceMapping.put(p, annotations[anvec.indexOf(a)]);
+ sequenceMapping.put(p, annotations[anvec.indexOf(a)]);
}
anvec.removeAllElements();
} else {
{
if (sequenceRef==null)
return;
-
+
int a = 0, aSize = sequenceRef.getLength();
if (aSize == 0)
ann = null;
return j;
}
-
+
/**
* Associate this annotion with the aligned residues of a particular sequence.
* sequenceMapping will be updated in the following way:
if (sequenceRef!=sequenceI && !sequenceRef.equals(sequenceI)) {
// throw away old mapping and reconstruct.
sequenceRef=null;
- if (sequenceMapping!=null)
+ if (sequenceMapping!=null)
{
sequenceMapping=null;
// compactAnnotationArray();