String tooltip = AnnotationPanel.buildToolTip(anns[rowIndex], column,
anns);
- if (true || !tooltip.equals(lastTooltip))
+ if (!tooltip.equals(lastTooltip))
{
- System.out.println("wrapped tooltip set");
lastTooltip = tooltip;
lastFormattedTooltip = tooltip == null ? null
: JvSwingUtils.wrapTooltip(true, tooltip);
*/
package jalview.io;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
import jalview.api.FeatureColourI;
import jalview.datamodel.DBRefEntry;
import jalview.datamodel.DBRefSource;
import jalview.util.UrlLink;
import jalview.viewmodel.seqfeatures.FeatureRendererModel;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
/**
* generate HTML reports for a sequence
*
appendFeature(sb, rpos, fr, feature, mf, 0);
}
+ /**
+ * Appends {@code sb} to {@code sb0}, and returns false, unless
+ * {@code maxlength} is not zero and appending would make the total length
+ * greater than {@code maxlength}, in which case the text is not appended, and
+ * the method returns true.
+ *
+ * @param sb0
+ * @param sb
+ * @param maxlength
+ * @return
+ */
private static boolean appendTextMaxLengthReached(StringBuilder sb0,
StringBuilder sb, int maxlength)
{
- boolean ret = false;
if (maxlength == 0 || sb0.length() + sb.length() < maxlength)
{
sb0.append(sb);
return false;
- } else {
- return true;
}
+ return true;
}
/**