JAL-3210 Barebones gradle/buildship/eclipse. See README
[jalview.git] / src / jalview / gui / JvSwingUtils.java
index c1c8c82..41287d2 100644 (file)
@@ -61,8 +61,7 @@ public final class JvSwingUtils
    * style class specifying word-wrap and break-word
    * 
    * @param enclose
-   *          if true, add <html> wrapper tags (currently false for only
-   *          two references -- both in Jws2Discoverer --
+   *          if true, add <html> wrapper tags
    * @param ttext
    * 
    * @return
@@ -95,12 +94,21 @@ public final class JvSwingUtils
     {
       return enclose ? "<html>" + ttext + "</html>" : ttext;
     }
-    // BH 2018,2019
-    return (enclose
-            ? "<html><div style=\"width:350px;white-space:pre-wrap;padding:2px;overflow-wrap:break-word;\">"
+
+    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\">"
+                        
             + ttext
-                    + "</div></html>"
-            : ttext);
+            
+            + " </div>"
+//            + "</p>"
+            + ((enclose ? "</html>" : ""));
 
   }
 
@@ -322,13 +330,13 @@ public final class JvSwingUtils
    * @param entries
    * @param tooltips
    */
-  public static JComboBox<String> buildComboWithTooltips(
-          List<String> entries, List<String> tooltips)
+  public static JComboBox<Object> buildComboWithTooltips(
+          List<Object> entries, List<String> tooltips)
   {
-    JComboBox<String> combo = new JComboBox<>();
+    JComboBox<Object> combo = new JComboBox<>();
     final ComboBoxTooltipRenderer renderer = new ComboBoxTooltipRenderer();
     combo.setRenderer(renderer);
-    for (String attName : entries)
+    for (Object attName : entries)
     {
       combo.addItem(attName);
     }