}
/**
- * Respond to mouse movement by constructing tooltip text for the sequence id
- * under the mouse.
+ * Responds to mouse movement by setting tooltip text for the sequence id
+ * under the mouse (or possibly annotation label, when in wrapped mode)
*
* @param e
- * DOCUMENT ME!
*/
@Override
public void mouseMoved(MouseEvent e)
AlignmentAnnotation annotation = av.getAlignment()
.getAlignmentAnnotation()[pos.annotationIndex];
setToolTipText(AnnotationLabels.getTooltip(annotation));
+ alignPanel.alignFrame.setStatus(annotation.label);
}
else
{
{
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,
- sequence.getDisplayId(true) + " " + tip.toString()));
+ 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());
}
}
}
}
MousePos pos = alignPanel.getSeqPanel().findMousePosition(e);
- if (pos.isOverAnnotation())
+ int seq = pos.seqIndex;
+ if (pos.isOverAnnotation() || seq < 0)
{
- // mouse is over annotation label in wrapped mode
return;
}
- int seq = pos.seqIndex;
String id = av.getAlignment().getSequenceAt(seq).getName();
String url = Preferences.sequenceUrlLinks.getPrimaryUrl(id);