From: tcofoegbu Date: Fri, 21 Aug 2015 16:05:14 +0000 (+0100) Subject: JAL-1834 capped the tool-tip text at 500. once that is exceeded an ellipsis is added X-Git-Tag: Release_2_10_0~523 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=19dae30f7acd7a93c432909db03a3373ded74e20;p=jalview.git JAL-1834 capped the tool-tip text at 500. once that is exceeded an ellipsis is added --- diff --git a/src/jalview/jbgui/GPDBSearchPanel.java b/src/jalview/jbgui/GPDBSearchPanel.java index 473f634..5a73b7c 100644 --- a/src/jalview/jbgui/GPDBSearchPanel.java +++ b/src/jalview/jbgui/GPDBSearchPanel.java @@ -93,8 +93,12 @@ public abstract class GPDBSearchPanel extends JPanel { e.printStackTrace(); } - toolTipText = (toolTipText == null ? null : JvSwingUtils.wrapTooltip( - true, toolTipText)); + toolTipText = (toolTipText == null ? null + : (toolTipText.length() > 500 ? JvSwingUtils.wrapTooltip( + true, "\"" + toolTipText.subSequence(0, 500) + + "...\"") : JvSwingUtils.wrapTooltip(true, + toolTipText))); + return toolTipText; } }; diff --git a/src/jalview/jbgui/GStructureChooser.java b/src/jalview/jbgui/GStructureChooser.java index caba85f..2c51b3d 100644 --- a/src/jalview/jbgui/GStructureChooser.java +++ b/src/jalview/jbgui/GStructureChooser.java @@ -165,8 +165,11 @@ public abstract class GStructureChooser extends JPanel implements { e.printStackTrace(); } - toolTipText = (toolTipText == null ? null : JvSwingUtils.wrapTooltip( - true, toolTipText)); + toolTipText = (toolTipText == null ? null + : (toolTipText.length() > 500 ? JvSwingUtils.wrapTooltip( + true, "\"" + toolTipText.subSequence(0, 500) + + "...\"") : JvSwingUtils.wrapTooltip(true, + toolTipText))); return toolTipText; } };