Jalview.isJS() --> Platform.isJS(), DBRefEntry[] --> List<DBRefEntry>
[jalview.git] / src / jalview / gui / JvSwingUtils.java
index 79e0cef..d44080a 100644 (file)
@@ -96,8 +96,19 @@ public final class JvSwingUtils
     }
 
     return (enclose ? "<html>" : "")
-            + "<style> p.ttip {width: 350; text-align: justify; word-wrap: break-word;}</style><p class=\"ttip\">"
-            + ttext + "</p>" + ((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>"
+//            + "</p>"
+            + ((enclose ? "</html>" : ""));
 
   }
 
@@ -356,12 +367,13 @@ public final class JvSwingUtils
 
   /**
    * Adds a titled border to the component in the default font and position (top
-   * left)
+   * left), optionally witht italic text
    * 
    * @param comp
    * @param title
+   * @param italic
    */
-  public static void createItalicTitledBorder(JComponent comp,
+  public static TitledBorder createTitledBorder(JComponent comp,
           String title, boolean italic)
   {
     Font font = comp.getFont();
@@ -374,6 +386,8 @@ public final class JvSwingUtils
             title, TitledBorder.LEADING, TitledBorder.DEFAULT_POSITION,
             font);
     comp.setBorder(titledBorder);
+
+    return titledBorder;
   }
 
 }