- SequenceI sequence = av.getAlignment().getSequenceAt(seq);
- StringBuilder tip = new StringBuilder(64);
- seqAnnotReport.createTooltipAnnotationReport(tip, sequence,
- av.isShowDBRefs(), av.isShowNPFeats(),
- sp.seqCanvas.fr.getMinMax());
- setToolTipText(JvSwingUtils.wrapTooltip(true,
- sequence.getDisplayId(true) + " " + tip.toString()));
+ /*
+ * mouse is over an annotation label in wrapped mode
+ */
+ AlignmentAnnotation[] anns = av.getAlignment()
+ .getAlignmentAnnotation();
+ AlignmentAnnotation annotation = anns[pos.annotationIndex];
+ setToolTipText(AnnotationLabels.getTooltip(annotation));
+ alignPanel.alignFrame.setStatus(
+ AnnotationLabels.getStatusMessage(annotation, anns));
+ }
+ else
+ {
+ int seq = Math.max(0, pos.seqIndex);
+ if (seq < av.getAlignment().getHeight())
+ {
+ SequenceI sequence = av.getAlignment().getSequenceAt(seq);
+ StringBuilder tip = new StringBuilder(64);
+ tip.append(sequence.getDisplayId(true)).append(" ");
+ seqAnnotReport.createTooltipAnnotationReport(tip, sequence,
+ av.isShowDBRefs(), av.isShowNPFeats(), sp.seqCanvas.fr);
+ setToolTipText(JvSwingUtils.wrapTooltip(true, tip.toString()));
+
+ StringBuilder text = new StringBuilder();
+ text.append("Sequence ").append(String.valueOf(seq + 1))
+ .append(" ID: ").append(sequence.getName());
+ alignPanel.alignFrame.setStatus(text.toString());
+ }