*/
public final class JvSwingUtils
{
+ public static final String HTML_PREFIX = "<html><div style=\"width:350px;white-space:pre-wrap;padding:2px;overflow-wrap:break-word;\">";
+
/**
* wrap a bare html safe string to around 60 characters per line using a CSS
* style class specifying word-wrap and break-word
{
return enclose ? "<html>" + ttext + "</html>" : ttext;
}
-
- return (enclose ? "<html><div style='width:350px'>"
-
- // BH 2018,2019
-
- + "<style> div.ttip {width:350px;white-space:pre-wrap;padding:2px;overflow-wrap:break-word;}</style><div class=\"ttip\">"
+ // BH 2018,2019
+ return (enclose
+ ? HTML_PREFIX
+ ttext
- + " </div></div>"
- + "</html>" : ttext);
+ + "</div></html>"
+ : ttext);
}