From: gmungoc Date: Thu, 12 May 2016 08:45:17 +0000 (+0100) Subject: JAL-2104 format tooltips to wrap correctly X-Git-Tag: Release_2_10_0~224^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3afeb8ae2ef300c3ac29025d2d2da93b0afb4be8;p=jalview.git JAL-2104 format tooltips to wrap correctly --- 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