From b7d08a8fc06966d98af98e4eaacb03db813005f5 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 7 Feb 2005 17:08:14 +0000 Subject: [PATCH] Settooltip for sequence feature --- src/jalview/gui/SeqPanel.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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()); } -- 1.7.10.2