From: amwaterhouse Date: Mon, 7 Feb 2005 17:08:14 +0000 (+0000) Subject: Settooltip for sequence feature X-Git-Tag: Release_2_0~696 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b7d08a8fc06966d98af98e4eaacb03db813005f5;p=jalview.git Settooltip for sequence feature --- diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index cc16a26..986f996 100755 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -187,19 +187,23 @@ public class SeqPanel extends JPanel Enumeration e = features.elements(); StringBuffer sbuffer = new StringBuffer(); - this.setToolTipText(null); + while (e.hasMoreElements()) { SequenceFeature sf = (SequenceFeature) e.nextElement(); if (sf.getStart() <= sequence.findPosition(res) && sf.getEnd() >= sequence.findPosition(res)) { + if(sbuffer.length()>0) + sbuffer.append("; "); sbuffer.append(sf.getType() + " " + sf.getDescription()); - ToolTipManager.sharedInstance().registerComponent(this); - this.setToolTipText(sbuffer.toString()); + } } + + ToolTipManager.sharedInstance().registerComponent(this); + this.setToolTipText(sbuffer.toString()); }