JAL-3253-applet JAL-3360 HTML tooltips not trimming properly; need <div>
[jalview.git] / src / jalview / gui / JvSwingUtils.java
index d44080a..c1c8c82 100644 (file)
@@ -61,7 +61,8 @@ public final class JvSwingUtils
    * style class specifying word-wrap and break-word
    * 
    * @param enclose
-   *          if true, add &lt;html&gt; wrapper tags
+   *          if true, add &lt;html&gt; wrapper tags (currently false for only
+   *          two references -- both in Jws2Discoverer --
    * @param ttext
    * 
    * @return
@@ -94,21 +95,12 @@ public final class JvSwingUtils
     {
       return enclose ? "<html>" + ttext + "</html>" : ttext;
     }
-
-    return (enclose ? "<html>" : "")
-            
-     // BH 2018
-            
-            + "<style> div.ttip {width:350px;white-space:pre-wrap;padding:2px;overflow-wrap:break-word;}</style><div class=\"ttip\">"
-            
-//            + "<style> p.ttip {width:350px;margin:-14px 0px -14px 0px;padding:2px;overflow-wrap:break-word;}"
-//            + "</style><p class=\"ttip\">"
-                        
+    // BH 2018,2019
+    return (enclose
+            ? "<html><div style=\"width:350px;white-space:pre-wrap;padding:2px;overflow-wrap:break-word;\">"
             + ttext
-            
-            + " </div>"
-//            + "</p>"
-            + ((enclose ? "</html>" : ""));
+                    + "</div></html>"
+            : ttext);
 
   }