From 0b1037e0bf412da13da24833ff9cdbf24c9aea60 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 22 Nov 2017 12:29:47 +0000 Subject: [PATCH] JAL-2069 renamed helper method better --- src/jalview/gui/CalculationChooser.java | 2 +- src/jalview/gui/JvSwingUtils.java | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/jalview/gui/CalculationChooser.java b/src/jalview/gui/CalculationChooser.java index 886762a..f674c7e 100644 --- a/src/jalview/gui/CalculationChooser.java +++ b/src/jalview/gui/CalculationChooser.java @@ -169,7 +169,7 @@ public class CalculationChooser extends JPanel JPanel treePanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); treePanel.setOpaque(false); - JvSwingUtils.createItalicTitledBorder(treePanel, + JvSwingUtils.createTitledBorder(treePanel, MessageManager.getString("label.tree"), true); // then copy the inset dimensions for the border-less PCA panel diff --git a/src/jalview/gui/JvSwingUtils.java b/src/jalview/gui/JvSwingUtils.java index 79e0cef..4658668 100644 --- a/src/jalview/gui/JvSwingUtils.java +++ b/src/jalview/gui/JvSwingUtils.java @@ -356,12 +356,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 +375,8 @@ public final class JvSwingUtils title, TitledBorder.LEADING, TitledBorder.DEFAULT_POSITION, font); comp.setBorder(titledBorder); + + return titledBorder; } } -- 1.7.10.2