JAL-3049 redo (part of) commit 92bc328
[jalview.git] / src / jalview / gui / FeatureSettings.java
index da4de25..390427a 100644 (file)
@@ -219,7 +219,7 @@ public class FeatureSettings extends JPanel
         case COLOUR_COLUMN:
           FeatureColourI colour = (FeatureColourI) table.getValueAt(row,
                   column);
-          tip = getColorTooltip(colour);
+          tip = getColorTooltip(colour, true);
           break;
         case FILTER_COLUMN:
           FeatureMatcherSet o = (FeatureMatcherSet) table.getValueAt(row,
@@ -1311,9 +1311,12 @@ public class FeatureSettings extends JPanel
    * Answers a suitable tooltip to show on the colour cell of the table
    * 
    * @param fcol
+   * @param withHint
+   *          if true include 'click to edit' and similar text
    * @return
    */
-  public static String getColorTooltip(FeatureColourI fcol)
+  public static String getColorTooltip(FeatureColourI fcol,
+          boolean withHint)
   {
     if (fcol == null)
     {
@@ -1321,13 +1324,16 @@ public class FeatureSettings extends JPanel
     }
     if (fcol.isSimpleColour())
     {
-      return BASE_TOOLTIP;
+      return withHint ? BASE_TOOLTIP : null;
     }
     String description = fcol.getDescription();
     description = description.replaceAll("<", "&lt;");
     description = description.replaceAll(">", "&gt;");
     StringBuilder tt = new StringBuilder(description);
-    tt.append("<br>").append(BASE_TOOLTIP).append("</br>");
+    if (withHint)
+    {
+      tt.append("<br>").append(BASE_TOOLTIP).append("</br>");
+    }
     return JvSwingUtils.wrapTooltip(true, tt.toString());
   }