X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FJvSwingUtils.java;h=41287d29fd49047ae59c9c41ce44f9dabf2701ae;hb=da98b580a62f583db2e12c8910e6d68862c22623;hp=79e0cefaa88418be0fc51af172d486e637fc1b62;hpb=05d220bbea0e8ce667490219436b96ebdf9826df;p=jalview.git diff --git a/src/jalview/gui/JvSwingUtils.java b/src/jalview/gui/JvSwingUtils.java index 79e0cef..41287d2 100644 --- a/src/jalview/gui/JvSwingUtils.java +++ b/src/jalview/gui/JvSwingUtils.java @@ -96,8 +96,19 @@ public final class JvSwingUtils } return (enclose ? "" : "") - + "

" - + ttext + "

" + ((enclose ? "" : "")); + + // BH 2018 + + + "
" + +// + "

" + + + ttext + + + "

" +// + "

" + + ((enclose ? "" : "")); } @@ -319,13 +330,13 @@ public final class JvSwingUtils * @param entries * @param tooltips */ - public static JComboBox buildComboWithTooltips( - List entries, List tooltips) + public static JComboBox buildComboWithTooltips( + List entries, List tooltips) { - JComboBox combo = new JComboBox<>(); + JComboBox combo = new JComboBox<>(); final ComboBoxTooltipRenderer renderer = new ComboBoxTooltipRenderer(); combo.setRenderer(renderer); - for (String attName : entries) + for (Object attName : entries) { combo.addItem(attName); } @@ -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; } }