From 3afeb8ae2ef300c3ac29025d2d2da93b0afb4be8 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 12 May 2016 09:45:17 +0100 Subject: [PATCH] JAL-2104 format tooltips to wrap correctly --- src/jalview/ws/jws2/Jws2Client.java | 7 ++----- src/jalview/ws/jws2/MsaWSClient.java | 13 +++++++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/jalview/ws/jws2/Jws2Client.java b/src/jalview/ws/jws2/Jws2Client.java index c0b701b..8855d96 100644 --- a/src/jalview/ws/jws2/Jws2Client.java +++ b/src/jalview/ws/jws2/Jws2Client.java @@ -256,11 +256,8 @@ public abstract class Jws2Client extends jalview.ws.WSClient }); wsmenu.add(aaConEnabled); final JMenuItem modifyParams = new JMenuItem(aaui.getAAeditSettings()); - modifyParams - .setToolTipText("

" - + JvSwingUtils.wrapTooltip(false, - aaui.getAAeditSettingsTooltip() + "

") - + ""); + modifyParams.setToolTipText(JvSwingUtils.wrapTooltip(true, + aaui.getAAeditSettingsTooltip())); modifyParams.addActionListener(new ActionListener() { diff --git a/src/jalview/ws/jws2/MsaWSClient.java b/src/jalview/ws/jws2/MsaWSClient.java index 47130a3..c83ef0f 100644 --- a/src/jalview/ws/jws2/MsaWSClient.java +++ b/src/jalview/ws/jws2/MsaWSClient.java @@ -216,6 +216,7 @@ public class MsaWSClient extends Jws2Client return (WebServiceName.indexOf("lustal") > -1); // cheat! } + @Override public void attachWSMenuEntry(JMenu rmsawsmenu, final Jws2Instance service, final AlignFrame alignFrame) { @@ -263,6 +264,7 @@ public class MsaWSClient extends Jws2Client method.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { AlignmentView msa = alignFrame.gatherSequencesForAlignment(); @@ -288,6 +290,7 @@ public class MsaWSClient extends Jws2Client method.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { AlignmentView msa = alignFrame.gatherSequencesForAlignment(); @@ -335,17 +338,19 @@ public class MsaWSClient extends Jws2Client } }); - methodR.setToolTipText(JvSwingUtils.wrapTooltip( + String tooltip = JvSwingUtils.wrapTooltip( true, - "

" + "" + (preset.isModifiable() ? MessageManager .getString("label.user_preset") : MessageManager .getString("label.service_preset")) - + "
" + preset.getDescription() - + "

")); + + "
" + + preset.getDescription()); + methodR.setToolTipText(tooltip); methodR.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { AlignmentView msa = alignFrame -- 1.7.10.2