X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignmentAnnotation.java;h=87c113fa5ad346e2c13b2f68b59a1fd7d2d02807;hb=cc190cfe952a4d8ef8c38247ee35b1a4675da572;hp=d3d25d9df682a1a9d89702820d15e9ed5740e059;hpb=c834ec02c02dec46f84960605bd7490aa8ac5a3a;p=jalview.git diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index d3d25d9..87c113f 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -57,7 +57,7 @@ public class AlignmentAnnotation /** * Score associated with label and description. */ - public float score= Float.NaN; + public double score= Double.NaN; /** * flag indicating if annotation has a score. */ @@ -88,7 +88,7 @@ public class AlignmentAnnotation public int graphHeight = 40; - public boolean padGaps = true; + public boolean padGaps = false; public static final int NO_GRAPH = 0; @@ -142,7 +142,6 @@ Loading... { if (annotations[i] == null) { - padGaps = false; continue; } if (annotations[i].secondaryStructure == 'H' || @@ -152,8 +151,9 @@ Loading... } if(annotations[i].displayCharacter==null) + { continue; - + } if (annotations[i].displayCharacter.length() == 1 && !annotations[i].displayCharacter.equals("H") @@ -172,8 +172,6 @@ Loading... { hasText = true; } - else - padGaps = false; } if (nonSSLabel) @@ -306,6 +304,11 @@ Loading... 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 (threshold!=null) { threshold = new GraphLine(annotation.threshold); } @@ -354,12 +357,18 @@ Loading... */ public void restrict(int startRes, int endRes) { + if (startRes<0) + startRes=0; + if (startRes>=annotations.length) + startRes = annotations.length-1; + if (endRes>=annotations.length) + endRes = annotations.length-1; if (annotations==null) return; Annotation[] temp = new Annotation[endRes-startRes+1]; if (startRes