JAL-2416 add score model description field for tooltip in PCA panel
[jalview.git] / src / jalview / analysis / scoremodels / ScoreMatrix.java
index 6a74dfc..b73f826 100644 (file)
@@ -51,10 +51,16 @@ public class ScoreMatrix implements SimilarityScoreModelI,
 
   /*
    * the name of the model as shown in menus
+   * each score model in use should have a unique name
    */
   private String name;
 
   /*
+   * a description for the model as shown in tooltips
+   */
+  private String description;
+
+  /*
    * the characters that the model provides scores for
    */
   private char[] symbols;
@@ -165,6 +171,12 @@ public class ScoreMatrix implements SimilarityScoreModelI,
   }
 
   @Override
+  public String getDescription()
+  {
+    return description;
+  }
+
+  @Override
   public boolean isDNA()
   {
     return !peptide;
@@ -487,4 +499,9 @@ public class ScoreMatrix implements SimilarityScoreModelI,
   {
     return new String(symbols);
   }
+
+  public void setDescription(String desc)
+  {
+    description = desc;
+  }
 }