Map<String, TreeSet<Score>> scoremap = scoremanager.asMap();
int alWidth = alignViewport.getAlignment().getWidth();
AlignmentI alignment;
- int ann = (alignment=alignViewport.getAlignment()).getAlignmentAnnotation().length;
- ArrayList<AlignmentAnnotation> ourAnnot=new ArrayList<AlignmentAnnotation>();
+ int ann = (alignment = alignViewport.getAlignment())
+ .getAlignmentAnnotation().length;
+ ArrayList<AlignmentAnnotation> ourAnnot = new ArrayList<AlignmentAnnotation>();
for (String score : scoremap.keySet())
{
TreeSet<Score> scores = scoremap.get(score);
// simple annotation row
annotation = findOrCreate(scr.getMethod(), true, null, null);
Annotation[] elm = new Annotation[alWidth];
- if (alWidth==scr.getScores().size())
+ if (alWidth == scr.getScores().size())
{
- Iterator<Float> vals = scr.getScores().iterator();
- float m=0f,x=0f;
- for (int i = 0; vals.hasNext(); i++)
- {
- float val = vals.next().floatValue();
- if (i==0) { m=val;x=val;} else { if (m>val) { m=val; }; if (x<val) { x=val;}}
- elm[i] = new Annotation("",""+val,' ',val);
- }
-
- annotation.annotations = elm;
- annotation.belowAlignment = true;
- if (x<0)
- {
- x=0;
- }
- x+=(x-m)*0.1;
- annotation.graphMax=x;
- annotation.graphMin=m;
- annotation.validateRangeAndDisplay();
- ourAnnot.add(annotation);
+ Iterator<Float> vals = scr.getScores().iterator();
+ float m = 0f, x = 0f;
+ for (int i = 0; vals.hasNext(); i++)
+ {
+ float val = vals.next().floatValue();
+ if (i == 0)
+ {
+ m = val;
+ x = val;
+ }
+ else
+ {
+ if (m > val)
+ {
+ m = val;
+ }
+ ;
+ if (x < val)
+ {
+ x = val;
+ }
+ }
+ elm[i] = new Annotation("", "" + val, ' ', val);
+ }
+
+ annotation.annotations = elm;
+ annotation.belowAlignment = true;
+ if (x < 0)
+ {
+ x = 0;
+ }
+ x += (x - m) * 0.1;
+ annotation.graphMax = x;
+ annotation.graphMin = m;
+ annotation.validateRangeAndDisplay();
+ ourAnnot.add(annotation);
}
}
}
}
- if (ourAnnot.size()>0)
+ if (ourAnnot.size() > 0)
{
- List<AlignmentAnnotation> our=ourAnnots;
+ List<AlignmentAnnotation> our = ourAnnots;
ourAnnots = ourAnnot;
- if (our!=null) {
- if (our.size()>0)
+ if (our != null)
+ {
+ if (our.size() > 0)
{
- for (AlignmentAnnotation an:our)
+ for (AlignmentAnnotation an : our)
{
if (!ourAnnots.contains(an))
{
our.clear();
}
}
- //if (ann != alignViewport.getAlignment().getAlignmentAnnotation().length)
+ // if (ann !=
+ // alignViewport.getAlignment().getAlignmentAnnotation().length)
{
ap.adjustAnnotationHeight();
}
- /* else
- {
- ap.paintAlignment(true);
- }*/
+ /*
+ * else { ap.paintAlignment(true); }
+ */
}
}