From dfc5d2b04210799f956df7824eba3693eca592c8 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 5 Dec 2005 16:29:26 +0000 Subject: [PATCH] SequenceFeature mouse over text updated --- src/jalview/appletgui/SeqPanel.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/jalview/appletgui/SeqPanel.java b/src/jalview/appletgui/SeqPanel.java index 1bbf15d..9030341 100755 --- a/src/jalview/appletgui/SeqPanel.java +++ b/src/jalview/appletgui/SeqPanel.java @@ -295,14 +295,13 @@ public class SeqPanel seqCanvas.pdbCanvas.highlightRes(sequence.findPosition(res)); } - ap.alignFrame.statusBar.setText(text.toString()); // use aa to see if the mouse pointer is on a - if (av.showSequenceFeatures) + if (av.showSequenceFeatures && sequence.getSequenceFeatures()!=null) { Vector features = sequence.getSequenceFeatures(); Enumeration e = features.elements(); - StringBuffer sbuffer = new StringBuffer(); + text.append(" Sequence Feature: "); while (e.hasMoreElements()) { @@ -310,20 +309,19 @@ public class SeqPanel if (sf.getBegin() <= sequence.findPosition(res) && sf.getEnd() >= sequence.findPosition(res)) { - if (sbuffer.length() > 0) - { - sbuffer.append("; "); - } - sbuffer.append(sf.getType() + " " + sf.getDescription()); + text.append(sf.getDescription()); if (sf.getStatus().length() > 0) { - sbuffer.append(" (" + sf.getStatus() + ")"); + text.append(" (" + sf.getStatus() + ")"); } + text.append("; "); } } } + ap.alignFrame.statusBar.setText(text.toString()); + } public void doMouseDragged(MouseEvent evt) -- 1.7.10.2