X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FJvSwingUtils.java;h=c1c8c829c017c2ec96773f345e605c8bbb3d8ed8;hb=1cec732f963ab102c9d8381203df8c8cba2a9ee4;hp=79e0cefaa88418be0fc51af172d486e637fc1b62;hpb=05d220bbea0e8ce667490219436b96ebdf9826df;p=jalview.git diff --git a/src/jalview/gui/JvSwingUtils.java b/src/jalview/gui/JvSwingUtils.java index 79e0cef..c1c8c82 100644 --- a/src/jalview/gui/JvSwingUtils.java +++ b/src/jalview/gui/JvSwingUtils.java @@ -61,7 +61,8 @@ public final class JvSwingUtils * style class specifying word-wrap and break-word * * @param enclose - * if true, add <html> wrapper tags + * if true, add <html> wrapper tags (currently false for only + * two references -- both in Jws2Discoverer -- * @param ttext * * @return @@ -94,10 +95,12 @@ public final class JvSwingUtils { return enclose ? "" + ttext + "" : ttext; } - - return (enclose ? "" : "") - + "

" - + ttext + "

" + ((enclose ? "" : "")); + // BH 2018,2019 + return (enclose + ? "
" + + ttext + + "
" + : ttext); } @@ -356,12 +359,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 +378,8 @@ public final class JvSwingUtils title, TitledBorder.LEADING, TitledBorder.DEFAULT_POSITION, font); comp.setBorder(titledBorder); + + return titledBorder; } }