+
+ /**
+ * @return the score
+ */
+ public double getScore()
+ {
+ return score;
+ }
+
+ /**
+ * @param score the score to set
+ */
+ public void setScore(double score)
+ {
+ hasScore=true;
+ this.score = score;
+ }
+ /**
+ *
+ * @return true if annotation has an associated score
+ */
+ public boolean hasScore()
+ {
+ return hasScore || !Double.isNaN(score);
+ }
+ /**
+ * Score only annotation
+ * @param label
+ * @param description
+ * @param score
+ */
+ public AlignmentAnnotation(String label, String description, double score)
+ {
+ this(label, description, null);
+ setScore(score);
+ }
+ /**
+ * copy constructor with edit based on the hidden columns marked in colSel
+ * @param alignmentAnnotation
+ * @param colSel
+ */
+ public AlignmentAnnotation(AlignmentAnnotation alignmentAnnotation,
+ ColumnSelection colSel)
+ {
+ this(alignmentAnnotation);
+ if (annotations==null)
+ {
+ return;
+ }
+ colSel.makeVisibleAnnotation(this);
+ }
+
+ public void setPadGaps(boolean padgaps, char gapchar)
+ {
+ this.padGaps = padgaps;
+ if(padgaps)
+ {
+ hasText = true;
+ for(int i=0; i<annotations.length; i++)
+ {
+ if(annotations[i]==null)
+ annotations[i] = new Annotation(String.valueOf(gapchar),null,' ',0f);
+ else if(annotations[i].displayCharacter==null ||annotations[i].displayCharacter.equals(" "))
+ annotations[i].displayCharacter=String.valueOf(gapchar);
+ }
+ }
+ }