From 7d4f1d8e997964bef5c351d04fbdafe4401cf5d7 Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 9 Sep 2008 10:09:17 +0000 Subject: [PATCH] tooltip contains non-positional features and popup contains URLs from non-pos features --- src/jalview/appletgui/IdPanel.java | 62 ++++++++++++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 6 deletions(-) diff --git a/src/jalview/appletgui/IdPanel.java b/src/jalview/appletgui/IdPanel.java index 9bf2374..b973913 100755 --- a/src/jalview/appletgui/IdPanel.java +++ b/src/jalview/appletgui/IdPanel.java @@ -20,6 +20,7 @@ package jalview.appletgui; import java.awt.*; import java.awt.event.*; +import java.util.Vector; import jalview.datamodel.*; import jalview.util.UrlLink; @@ -86,27 +87,54 @@ public class IdPanel extends Panel implements MouseListener, int seq = alignPanel.seqPanel.findSeq(e); SequenceI sequence = av.getAlignment().getSequenceAt(seq); + + // look for non-pos features + StringBuffer tooltiptext = new StringBuffer(); + - if (sequence.getDescription() == null) + if (sequence.getDescription() != null) { + tooltiptext.append(sequence.getDescription()); + tooltiptext.append("\n"); + } + + SequenceFeature sf[] = sequence.getSequenceFeatures(); + for (int sl=0;sf!=null && sl0) + { + for (int l=0, lSize=sf[sl].links.size(); l