JAL-3187 add sequence to feature details table (and refactor PopupMenu)
[jalview.git] / src / jalview / datamodel / SequenceFeature.java
index 7052f34..e7e1342 100755 (executable)
@@ -345,6 +345,11 @@ public class SequenceFeature implements FeatureLocationI
     return featureGroup;
   }
 
+  /**
+   * Adds a hyperlink for the feature. This should have the format label|url.
+   * 
+   * @param labelLink
+   */
   public void addLink(String labelLink)
   {
     if (links == null)
@@ -602,9 +607,11 @@ public class SequenceFeature implements FeatureLocationI
   /**
    * Answers an html-formatted report of feature details
    * 
+   * @param sequence
+   * 
    * @return
    */
-  public String getDetailsReport()
+  public String getDetailsReport(SequenceI sequence)
   {
     FeatureSourceI metadata = FeatureSources.getInstance()
             .getSource(source);
@@ -612,9 +619,10 @@ public class SequenceFeature implements FeatureLocationI
     StringBuilder sb = new StringBuilder(128);
     sb.append("<br>");
     sb.append("<table>");
+    sb.append(String.format(ROW_DATA, "Location", sequence.getName(),
+            begin == end ? begin
+                    : begin + (isContactFeature() ? ":" : "-") + end));
     sb.append(String.format(ROW_DATA, "Type", type, ""));
-    sb.append(String.format(ROW_DATA, "Start/end", begin == end ? begin
-            : begin + (isContactFeature() ? ":" : "-") + end, ""));
     String desc = StringUtils.stripHtmlTags(description);
     sb.append(String.format(ROW_DATA, "Description", desc, ""));
     if (!Float.isNaN(score) && score != 0f)